View Source TalkJS.HTTPClient behaviour (talkjs v0.1.0)

Behaviour for HTTP clients.

Summary

Callbacks

@callback init() :: :ok
Link to this callback

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

View Source
@callback request(
  method :: atom(),
  url :: binary(),
  headers :: [{binary(), binary()}],
  body :: binary(),
  opts :: keyword()
) ::
  {:ok, %{status: 200..599, headers: [{binary(), binary()}], body: binary()}}
  | {:error, term()}