ex_slack v0.2.2 Slack.Lib.HTTP behaviour View Source

Behaviour for Slack HTTP client.

Link to this section Summary

Types

Valid Slack Header

HTTP Headers

Key value pair

HTTP Method

HTTP Payload

HTTP URL

Link to this section Types

Link to this type header() View Source
header() :: nil

Valid Slack Header.

Link to this type headers() View Source
headers() :: [header()]

HTTP Headers

Link to this type key_val() View Source
key_val() :: {:key, :val}

Key value pair.

Link to this type method() View Source
method() :: :get | :post

HTTP Method.

Link to this type payload() View Source
payload() :: [key_val()]

HTTP Payload.

Link to this type url() View Source
url() :: binary()

HTTP URL.

Link to this section Callbacks

Link to this callback request(method, url, payload, headers) View Source
request(method(), url(), payload(), headers()) ::
  {:ok, Slack.Lib.HTTP.Response.t()} |
  {:error, term()}

Make http request.