View Source ExUserCheck.HttpHelpers (ex_user_check v0.2.0)
Collection of helpers for HTTP requests
Summary
Functions
Performs an HTTP GET request with deserialization and error management.
HTTP options of req middleware
Functions
@spec get(binary(), binary(), (map() -> any()), keyword()) :: {:ok, any()} | {:error, ExUserCheck.Error.t()}
Performs an HTTP GET request with deserialization and error management.
Parameters
path
(binary): Base API path.subpath
(binary): API subpath.deserializer_fn
(function): Function to deserialize the response body.params
(keyword list, optional): Query parameters.
Returns
{:ok, deserialized_data}
on success (200
).{:error, ExUserCheck.Error.t()}
on failure.
HTTP options of req middleware