Outkit.HttpClient (Outkit v0.0.4) View Source

This module fascilitates communication with the HTTP API endpoints.

It is typically not used directly, but you can if you want.

Example

# Perform a GET request to retrieve a message
{:ok, response} = Outkit.HttpClient.do_request(client, :get, "/messages/" <> id)

# Perform a POST request to create a message
{:ok, response} = Outkit.HttpClient.do_request(client, :post, "/messages", %{message: message})

Link to this section Summary

Functions

Perform an HTTP request against an Outkit API endpoint.

Link to this section Functions

Link to this function

do_request(client, method, uri_fragment, native_body \\ nil)

View Source

Perform an HTTP request against an Outkit API endpoint.

Requires an Outkit.Client as the first argument.

Examples

do_request(client, :post, "/messages", %{message: message})