View Source HTTPSpec.Response (http_spec v2.0.1)
A struct for describing HTTP response.
Summary
Functions
Returns the values of the header specified by name
.
Returns the values of the trailer specified by name
.
Types
Functions
Returns the values of the header specified by name
.
Examples
iex> Response.get_header(response, "content-type")
["application/json"]
iex> Response.get_header(response, "x-unknown")
[]
Returns the values of the trailer specified by name
.
Examples
iex> Response.get_trailer(response, "expires")
["Wed, 21 Oct 2015 07:28:00 GMT"]
iex> Response.get_trailer(response, "x-unknown")
[]
@spec new(keyword() | map()) :: {:ok, t()} | {:error, HTTPSpec.ArgumentError.t()}