Hexoku.Request
Make generic Heroku HTTP requests.
You can use this for making API requests to API endpoints that are still to be supported by Hexoku.
Examples:
client = Hexoku.toolbelt
client |> Hexoku.Request.get("/apps")
Summary
| delete(client, path) | |
| delete(url, headers \\ [], options \\ []) | |
| get(client, path) | |
| get(url, headers \\ [], options \\ []) | |
| head(client, path) | |
| head(url, headers \\ [], options \\ []) | |
| options(client, path) | |
| options(url, headers \\ [], options \\ []) | |
| patch(client, path, body) | |
| patch(url, body, headers \\ [], options \\ []) | |
| post(client, path, body) | |
| post(url, body, headers \\ [], options \\ []) | |
| put(client, path, body) | |
| put(url, body, headers \\ [], options \\ []) | |
| request(method, url, body \\ "", headers \\ [], options \\ []) | Sends an HTTP request. Args:
|
| start() | Start httpoison and dependencies |
| transformer(target) |
Functions
Specs:
- delete(binary, headers, [{atom, any}]) :: HTTPoison.Response.t | HTTPoison.AsyncResponse.t
Specs:
- get(binary, headers, [{atom, any}]) :: HTTPoison.Response.t | HTTPoison.AsyncResponse.t
Specs:
- head(binary, headers, [{atom, any}]) :: HTTPoison.Response.t | HTTPoison.AsyncResponse.t
Specs:
- options(binary, headers, [{atom, any}]) :: HTTPoison.Response.t | HTTPoison.AsyncResponse.t
Specs:
- patch(binary, binary, headers, [{atom, any}]) :: HTTPoison.Response.t | HTTPoison.AsyncResponse.t
Specs:
- post(binary, binary, headers, [{atom, any}]) :: HTTPoison.Response.t | HTTPoison.AsyncResponse.t
Specs:
- put(binary, binary, headers, [{atom, any}]) :: HTTPoison.Response.t | HTTPoison.AsyncResponse.t
Specs:
- request(atom, binary, binary, headers, [{atom, any}]) :: HTTPoison.Response.t | HTTPoison.AsyncResponse.t
Sends an HTTP request. Args:
- method - HTTP method, atom (:get, :head, :post, :put, :delete, etc.)
- url - URL, binary string or char list
- body - request body, binary string or char list
- headers - HTTP headers, orddict (eg. [{:Accept, "application/json"}])
- options - orddict of options Options:
- timeout - timeout in ms, integer Returns HTTPoison.Response if successful. Raises HTTPoison.HTTPError if failed.