Atex.XRPC.Adapter behaviour (atex v0.2.0)

View Source

Behaviour for defining a HTTP client adapter to be used for XRPC.

Summary

Types

error()

@type error() :: {:error, integer(), map()} | {:error, term()}

result()

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

success()

@type success() :: {:ok, map()}

Callbacks

get(url, opts)

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

post(url, opts)

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