exhal v7.1.2 ExHal.Navigation

Link to this section Summary

Functions

Follows all links of a particular rel in a HAL document

Returns {:ok, url} if a matching link is found or {:error, %ExHal.Error{...}} if not

Returns {:ok, [url1, ...]} if a matching link is found or {:error, %ExHal.Error{...}} if not

PATCHs data to the named link in a HAL document

Posts data to the named link in a HAL document

PUTs data to the named link in a HAL document

Link to this section Functions

Link to this function follow_link(a_doc, name, opts \\ %{tmpl_vars: %{}, strict: false, headers: []})

Follows a link in a HAL document.

Returns {:ok, %ExHal.Document{...}, %ExHal.ResponseHeader{...}} if response is successful; {:error, %ExHal.Error{...}} if not

Link to this function follow_links(a_doc, name)
Link to this function follow_links(a_doc, name, opts)

Follows all links of a particular rel in a HAL document.

Returns [{:ok, %ExHal.Document{...}, %ExHal.ResponseHeader{...}}, {:error, %ExHal.Error{...}, ...]

Link to this function follow_links(a_doc, name, missing_link_handler, opts \\ %{})
Link to this function patch(a_doc, name, body, opts \\ %{tmpl_vars: %{}, strict: true})

PATCHs data to the named link in a HAL document.

Returns {:ok, %ExHal.Document{...}, %ExHal.ResponseHeader{...}} if response is successful and body is HAL; {:error, %ExHal.Error{...}} if response is an error if not

Link to this function post(a_doc, name, body, opts \\ %{tmpl_vars: %{}, strict: true})

Posts data to the named link in a HAL document.

Returns {:ok, %ExHal.Document{...}, %ExHal.ResponseHeader{...}} if response is successful and body is HAL; {:error, %ExHal.Error{...}} if response is an error if not

Link to this function put(a_doc, name, body, opts \\ %{tmpl_vars: %{}, strict: true})

PUTs data to the named link in a HAL document.

Returns {:ok, %ExHal.Document{...}, %ExHal.ResponseHeader{...}} if response is successful and body is HAL; {:error, %ExHal.Error{...}} if response is an error if not