Skip to content

Releases: simonrand/ex_link_header

v0.0.5

01 Jul 17:49

Choose a tag to compare

You can now build link headers using ExLinkHeader.build/1.

Beaking changes:

ExLinkHeader.parse/2 now returns a struct for each parsed link header as opposed to a map in versions <= 0.0.4.

v0.0.4

12 May 20:39

Choose a tag to compare

Changes in this version

Links with no page or per_page param previously returned nil by default for both these params, even if they did not exist - this is now no longer the case, page and per_page are now treated like any other query params. To return nil for these values you can supply defaults for any param when calling parse to ensure default values are returned, for example:

ExLinkHeader.parse!("<https://api.github.com/user/simonrand/repos?per_page=100>; rel=\"next\", ", %{page: nil})
#=> %{"next" => %{
        url: "https://api.github.com/user/simonrand/repos?per_page=100",
        page: nil,
        per_page: "100",
        rel: "next"
      }
    }