talira

Erlang library for parsing and building Web protocol messages

open sourceISCfree

Cowlib is an Erlang support library for parsing and building messages for Web protocols, including HTTP/1.1, HTTP/2 and Websocket, with modules for parts such as cookies. It aims for completeness over speed: every value is parsed and returned, none ignored. Loïc Hoguin maintains it alongside the Cowboy web server and the Gun HTTP client, whose manuals it lists under see also.

Problems it solves

  • parse HTTP headers in Erlang
  • build Websocket frames from an Erlang program
  • handle HTTP/2 frames in Elixir or Erlang without writing a parser

Features

  • parses and builds HTTP/1.1, HTTP/2 and Websocket messages
  • returns every value, none ignored
  • function reference as man pages and a user guide in PDF and HTML

Limitations

  • It's optimised for completeness rather than speed.1