Ankh.HTTP.Response (ankh v0.17.0)

Ankh HTTP Response

Link to this section Summary

Types

Response status

t()

Link to this section Types

@type status() :: pos_integer()

Response status

@type t() :: %Ankh.HTTP.Response{
  body: Ankh.HTTP.body(),
  body_fetched: boolean(),
  complete: boolean(),
  headers: Ankh.HTTP.headers(),
  status: status(),
  trailers: Ankh.HTTP.headers()
}

Link to this section Functions

Link to this function

fetch_body(response)

@spec fetch_body(t()) :: t()
Link to this function

new(attrs \\ [])

@spec new(Enum.t()) :: t()
Link to this function

set_body(response, body)

@spec set_body(t(), iodata()) :: t()
Link to this function

set_status(response, status)

@spec set_status(t(), status()) :: t()
Link to this function

validate_headers(headers, strict, forbidden \\ [])

@spec validate_headers(Ankh.HTTP.headers(), boolean(), [Ankh.HTTP.header_name()]) ::
  :ok | {:error, :protocol_error}