Behaviour for HTTP adapters.
ExGram ships with three adapters:
ExGram.Adapter.Req- Recommended, uses ReqExGram.Adapter.Tesla- Uses Tesla with configurable middlewareExGram.Adapter.Test- For testing, see Testing guide
Implement this behaviour to create a custom adapter.
Summary
Types
@type path() :: String.t()
@type result_request() :: {:ok, map()} | {:error, ExGram.Error.t()}
@type verb() :: :post | :get
Callbacks
@callback request(verb(), path(), body(), keyword()) :: result_request()