View Source AnyHttp (Any HTTP v0.1.1)

Provides an interface which dispatches the function to the right adapter.

Configuration

Defines in your application the following configuration depending of the adapter you choose:

config :any_http, :client_adapter, AnyHttp.Adapters.Req

Summary

Functions

Makes a DELETE request to the given URL.

Makes a GET request to the given URL.

Makes a HEAD request to the given URL.

Makes a PATCH request to the given URL.

Makes a POST request to the given URL.

Makes a PUT request to the given URL.

Types

Functions

Link to this function

delete(url, headers, body \\ nil, opts \\ [])

View Source
@spec delete(url(), headers(), body(), opts()) :: {:ok, response()} | {:error, term()}

Makes a DELETE request to the given URL.

Link to this function

get(url, headers, body \\ nil, opts \\ [])

View Source
@spec get(url(), headers(), body(), opts()) :: {:ok, response()} | {:error, term()}

Makes a GET request to the given URL.

Link to this function

head(url, headers, opts \\ [])

View Source
@spec head(url(), headers(), opts()) :: {:ok, response()} | {:error, term()}

Makes a HEAD request to the given URL.

Link to this function

patch(url, headers, body \\ nil, opts \\ [])

View Source
@spec patch(url(), headers(), body(), opts()) :: {:ok, response()} | {:error, term()}

Makes a PATCH request to the given URL.

Link to this function

post(url, headers, body \\ nil, opts \\ [])

View Source
@spec post(url(), headers(), body(), opts()) :: {:ok, response()} | {:error, term()}

Makes a POST request to the given URL.

Link to this function

put(url, headers, body \\ nil, opts \\ [])

View Source
@spec put(url(), headers(), body(), opts()) :: {:ok, response()} | {:error, term()}

Makes a PUT request to the given URL.