Mxpanel.HTTPClient behaviour (Mxpanel v0.1.0) View Source

Specifies the behaviour of a HTTP Client.

Link to this section Summary

Link to this section Callbacks

Link to this callback

request(method, url, headers, body, opts)

View Source

Specs

request(
  method :: atom(),
  url :: binary(),
  headers :: list(),
  body :: iodata(),
  opts :: Keyword.t()
) ::
  {:ok, %{status: integer(), headers: [{binary(), binary()}], body: binary()}}
  | {:error, term()}

Sends an HTTP request.