pagantis_elixir_tools v0.21.3 ElixirTools.HttpClient.Request behaviour

A Request prepares and does the call to an external provider.

Link to this section Summary

Types

The parameters to build the request.

The return for every request.

Link to this section Types

Specs

params() :: map()

The parameters to build the request.

Link to this type

request_opt()

Specs

request_opt() :: []
Link to this type

request_return()

Specs

request_return() :: {:ok, atom() | json()} | {:error, json()}

The return for every request.

Link to this section Callbacks

Link to this callback

create(params, request_opt)

(optional)

Specs

create(params(), request_opt()) :: request_return()

Execute an action on a resource

Link to this callback

delete(params, request_opt)

(optional)

Specs

delete(params(), request_opt()) :: request_return()
Link to this callback

get(params, request_opt)

(optional)

Specs

Link to this callback

update(params, request_opt)

(optional)

Specs

update(params(), request_opt()) :: request_return()