Vnu.HTTPClient behaviour (Vnu v1.1.0) View Source

Specification for a Vnu HTTP client.

Link to this section Summary

Callbacks

A callback to make a POST HTTP request.

Link to this section Types

Specs

body() :: String.t()

Specs

header() :: {String.t(), String.t()}

Specs

response() :: %{status: status(), body: body()}

Specs

status() :: non_neg_integer()

Specs

url() :: String.t()

Link to this section Callbacks

Specs

post(url(), body(), [header()]) :: {:ok, response()} | {:error, any()}

A callback to make a POST HTTP request.