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

Specification for a Vnu HTTP client.

Summary

Callbacks

A callback to make a POST HTTP request.

Types

@type body() :: String.t()
@type header() :: {String.t(), String.t()}
@type response() :: %{status: status(), body: body()}
@type status() :: non_neg_integer()
@type url() :: String.t()

Callbacks

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

A callback to make a POST HTTP request.