View Source ActivityPub.Federator.HTTP (Bonfire v0.9.10-classic-beta.169)

Module for building and performing HTTP requests.

Summary

Types

@type t() :: ActivityPub.Federator.HTTP

Functions

Link to this function

delete(url, body \\ "", headers \\ [], options \\ [])

View Source

Makes a DELETE request

see ActivityPub.Federator.HTTP.http_request/5

Link to this function

get(url, headers \\ [], options \\ [])

View Source

Makes a GET request

see ActivityPub.Federator.HTTP.http_request/5

Link to this function

http_request(method, url, body \\ "", headers \\ [], options \\ [])

View Source

Builds and perform http request.

Arguments:

method - :get, :post, :put, :delete url body headers - a keyworld list of headers, e.g. [{"content-type", "text/plain"}] options - custom, per-request middleware or adapter options

Returns:

{:ok, %Tesla.Env{}} or {:error, error}

Link to this function

post(url, body, headers \\ [], options \\ [])

View Source

Makes a POST request

see ActivityPub.Federator.HTTP.http_request/5

Link to this function

put(url, body, headers \\ [], options \\ [])

View Source

Makes a PUT request

see ActivityPub.Federator.HTTP.http_request/5