hipchat_elixir v0.5.1 Hipchat.Httpc View Source

Thin wrapper around Erlang’s httpc. Used in all API functions.

Link to this section Summary

Functions

Send HTTP request with the given parameters

Link to this section Types

Link to this type headers_t() View Source
headers_t() :: [{String.t(), String.t()}]
Link to this type method_t() View Source
method_t() :: :get | :post | :put | :delete
Link to this type options_t() View Source
options_t() :: list()
Link to this type res_t() View Source
res_t() :: {:ok, Hipchat.Httpc.Response.t()} | {:error, term()}

Link to this section Functions

Link to this function request(method, url, body, headers, options \\ []) View Source
request(method_t(), String.t(), term(), headers_t(), options_t()) :: res_t()

Send HTTP request with the given parameters.

options accepts any options available in :httpc.request/4. Additionally,

  • :http_options for http_options in :httpc.request/4
  • :params option can take query params as Hipchat.Client.query_params_t.

It can be injected via Hipchat.Client.t.