hex.pm versionhex.pm downloadsAPI Docsunlicense

ex_http_link

An Elixir library than implements a parser and a writer for the HTTP Link header as specified in RFC 5988 "Web Linking".

Why this when ex_link_header exists? This one uses awesome NimbleParsec parser combinators instead of messy regexps and doesn't turn arbitrary strings into atoms.

Installation

Add ex_http_link to your project's dependencies in mix.exs:

def deps do
  [
    {:ex_http_link, "~> 0.1.3"}
  ]
end

And fetch your project's dependencies:

$ mix deps.get

Usage

iex> ExHttpLink.parse ~S(<http://example.com>; rel="example"; rev=test, <yolo.swag>; whatEver="")
{:ok, [ { "http://example.com", {"rel", "example"}, {"rev", "test"} },
        { "yolo.swag", {"whatEver", ""} } ]}

License

This is free and unencumbered software released into the public domain.
For more information, please refer to the UNLICENSE file or unlicense.org.