exhal v7.1.2 ExHal.Client behaviour
Behavior related to making HTTP requests.
Examples
iex> ExHal.Client.new()
%ExHal.Client{}
Link to this section Summary
Types
The return value of any function that makes an HTTP request
Represents a client configuration/connection. Create with new
function
Functions
Returns client that will include the specified headers in any request made with it
Returns a new client
Link to this section Types
Link to this type
http_response()
http_response() :: {:ok, ExHal.Document.t() | ExHal.NonHalResponse.t(), ExHal.ResponseHeader.t()} | {:error, ExHal.Document.t() | ExHal.NonHalResponse.t(), ExHal.ResponseHeader.t()} | {:error, Error.t()}
The return value of any function that makes an HTTP request.
Represents a client configuration/connection. Create with new
function.
Link to this section Functions
Link to this function
add_headers(client, headers)
add_headers(ExHal.Client.t(), Keyword.t()) :: ExHal.Client.t()
Returns client that will include the specified headers in any request made with it.
Link to this function
get(client, url, opts \\ [])
Returns a new client.
Link to this function
patch(client, url, body, opts \\ [])
Link to this function
post(client, url, body, opts \\ [])
Link to this function
put(client, url, body, opts \\ [])
Link to this section Callbacks
Link to this callback
get(arg0, arg1, arg2)
get(ExHal.Client.t(), String.t(), Keyword.t()) :: http_response()
Link to this callback
patch(arg0, arg1, <<>>, arg3)
patch(ExHal.Client.t(), String.t(), <<_::0>>, Keyword.t()) :: http_response()
Link to this callback
post(arg0, arg1, <<>>, arg3)
post(ExHal.Client.t(), String.t(), <<_::0>>, Keyword.t()) :: http_response()
Link to this callback
put(arg0, arg1, <<>>, arg3)
put(ExHal.Client.t(), String.t(), <<_::0>>, Keyword.t()) :: http_response()