Vnu.HTTPClient behaviour (Vnu v1.2.0)

View Source

Specification for a Vnu HTTP client.

Summary

Callbacks

A callback to make a POST HTTP request.

Types

body()

@type body() :: String.t()

header()

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

response()

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

status()

@type status() :: non_neg_integer()

url()

@type url() :: String.t()

Callbacks

post(url, body, list)

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

A callback to make a POST HTTP request.