Atex.HTTP.Adapter behaviour (atex v0.3.0)

View Source

Behaviour for defining a HTTP client adapter to be used within atex.

Summary

Types

error()

@type error() :: {:error, Atex.HTTP.Response.t() | term()}

result()

@type result() :: success() | error()

success()

@type success() :: {:ok, Atex.HTTP.Response.t()}

Callbacks

get(url, opts)

@callback get(url :: String.t(), opts :: keyword()) :: result()

post(url, opts)

@callback post(url :: String.t(), opts :: keyword()) :: result()