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")
Source

Summary

delete(client, path)

Perform a basic HTTP DELETE request to the API endpoint

get(client, path)

Perform a basic HTTP GET request to the API endpoint

head(client, path)

Perform a basic HTTP HEAD request to the API endpoint

options(client, path)

Perform a basic HTTP OPTIONS request to the API endpoint

patch(client, path, body)

Perform a basic HTTP PATCH request to the API endpoint

post(client, path, body)

Perform a basic HTTP POST request to the API endpoint

put(client, path, body)

Perform a basic HTTP PUT request to the API endpoint

Functions

delete(client, path)

Specs:

  • delete(Hexoku.Client.t, binary) :: Hexoku.Response.t
Perform a basic HTTP DELETE request to the API endpoint.

## Examples
    Hexoku.toolbelt |> Hexoku.Request.delete("/apps/myapp")
Source
get(client, path)

Specs:

  • get(Hexoku.Client.t, binary) :: Hexoku.Response.t
Perform a basic HTTP GET request to the API endpoint.

## Examples
    Hexoku.toolbelt |> Hexoku.Request.get("/apps")
Source
head(client, path)

Specs:

  • head(Hexoku.Client.t, binary) :: Hexoku.Response.t
Perform a basic HTTP HEAD request to the API endpoint.

## Examples
    Hexoku.toolbelt |> Hexoku.Request.head("/apps")
Source
options(client, path)

Specs:

  • options(Hexoku.Client.t, binary) :: Hexoku.Response.t
Perform a basic HTTP OPTIONS request to the API endpoint.

## Examples
    Hexoku.toolbelt |> Hexoku.Request.options("/apps/myapp")
Source
patch(client, path, body)

Specs:

  • patch(Hexoku.Client.t, binary, Map.t) :: Hexoku.Response.t
Perform a basic HTTP PATCH request to the API endpoint.

## Examples
    Hexoku.toolbelt |> Hexoku.Request.put("/apps/myapp", %{foo: "bar"})
Source
post(client, path, body)

Specs:

  • post(Hexoku.Client.t, binary, Map.t) :: Hexoku.Response.t
Perform a basic HTTP POST request to the API endpoint.

## Examples
    Hexoku.toolbelt |> Hexoku.Request.post("/apps", %{foo: "bar"})
Source
put(client, path, body)

Specs:

  • put(Hexoku.Client.t, binary, Map.t) :: Hexoku.Response.t
Perform a basic HTTP PUT request to the API endpoint.

## Examples
    Hexoku.toolbelt |> Hexoku.Request.put("/apps/myapp", %{foo: "bar"})
Source