exhal v8.2.0 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()
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()}
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.
Link to this opaque
t()
(opaque)
t()
(opaque)
t()
t()
Represents a client configuration/connection. Create with new
function.
Link to this section Functions
Link to this function
add_headers(client, headers)
add_headers(client, headers)
add_headers(ExHal.Client.t(), Keyword.t()) :: ExHal.Client.t()
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
delete(client, url, opts \\ [])
Link to this function
get(client, url, opts \\ [])
Link to this function
new()
new()
new() :: ExHal.Client.t()
new() :: ExHal.Client.t()
Link to this function
new(headers)
new(headers)
new(Keyword.t()) :: ExHal.Client.t()
new(Keyword.t()) :: ExHal.Client.t()
Link to this function
new(headers, list)
new(headers, list)
new(Keyword.t(), Keyword.t()) :: ExHal.Client.t()
new(Keyword.t(), Keyword.t()) :: ExHal.Client.t()
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
delete(arg1, arg2, arg3)
delete(arg1, arg2, arg3)
delete(ExHal.Client.t(), String.t(), Keyword.t()) :: http_response()
delete(ExHal.Client.t(), String.t(), Keyword.t()) :: http_response()
Link to this callback
get(arg1, arg2, arg3)
get(arg1, arg2, arg3)
get(ExHal.Client.t(), String.t(), Keyword.t()) :: http_response()
get(ExHal.Client.t(), String.t(), Keyword.t()) :: http_response()
Link to this callback
patch(arg1, arg2, <<>>, arg4)
patch(arg1, arg2, <<>>, arg4)
patch(ExHal.Client.t(), String.t(), <<_::0>>, Keyword.t()) :: http_response()
patch(ExHal.Client.t(), String.t(), <<_::0>>, Keyword.t()) :: http_response()
Link to this callback
post(arg1, arg2, <<>>, arg4)
post(arg1, arg2, <<>>, arg4)
post(ExHal.Client.t(), String.t(), <<_::0>>, Keyword.t()) :: http_response()
post(ExHal.Client.t(), String.t(), <<_::0>>, Keyword.t()) :: http_response()
Link to this callback
put(arg1, arg2, <<>>, arg4)
put(arg1, arg2, <<>>, arg4)
put(ExHal.Client.t(), String.t(), <<_::0>>, Keyword.t()) :: http_response()
put(ExHal.Client.t(), String.t(), <<_::0>>, Keyword.t()) :: http_response()