View Source AnyHttp.Types (Any HTTP v0.1.1)

Defines the typespecs for the library.

Summary

Types

Represents the body of a request.

Represents the headers of a request.

Represents the options passed to the adapter.

Represents the response of a request.

Represents the result of a request. It can be either a success or an error.

Represents an URL.

Types

@type body() :: any()

Represents the body of a request.

@type headers() :: [{binary(), binary()}]

Represents the headers of a request.

@type opts() :: [{atom(), any()}]

Represents the options passed to the adapter.

@type response() :: AnyHttp.Response.t()

Represents the response of a request.

@type result() :: {:ok, response()} | {:error, term()}

Represents the result of a request. It can be either a success or an error.

@type url() :: binary() | URI.t()

Represents an URL.