View Source AnyHttp (Any HTTP v0.6.3)
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
@type adapter_opts() :: Keyword.t()
@type body() :: nil | binary()
@type headers() :: nil | Enumerable.t()
@type method() :: :head | :get | :post | :put | :patch | :delete
@type response() :: {:ok, AnyHttp.Response.t()} | {:error, Exception.t()}
Functions
@spec delete(url(), headers(), body(), adapter_opts()) :: response()
Makes a DELETE request to the given URL.
@spec get(url(), headers(), body(), adapter_opts()) :: response()
Makes a GET request to the given URL.
@spec head(url(), headers(), adapter_opts()) :: response()
Makes a HEAD request to the given URL.
@spec patch(url(), headers(), body(), adapter_opts()) :: response()
Makes a PATCH request to the given URL.
@spec post(url(), headers(), body(), adapter_opts()) :: response()
Makes a POST request to the given URL.
@spec put(url(), headers(), body(), adapter_opts()) :: response()
Makes a PUT request to the given URL.