Closed amhamid closed 8 years ago
There is an incorrect example in the documentation, that can cause users have difficulties in using it. See my pull request: #46
iex> doc = ExHal.client ...> |> ExHal.Client.add_headers("User-Agent": "MyClient/1.0") ...> |> ExHal.Client.get("http://example.com/hal") %ExHal.Document{...}
==> You need to pattern match like this, so that your next example to follow_link will work fine:
{:ok, doc} = ExHal.client ...> |> ExHal.Client.add_headers("User-Agent": "MyClient/1.0") ...> |> ExHal.Client.get("http://example.com/hal") %ExHal.Document{...}
iex> ExHal.follow_link("self")
==> Should be this:
iex> ExHal.follow_link(doc, "self")
Fixed by #46. Thanks.
There is an incorrect example in the documentation, that can cause users have difficulties in using it. See my pull request: #46
Details
==> You need to pattern match like this, so that your next example to follow_link will work fine:
==> Should be this: