ankh v0.8.8 Ankh.HTTP.Response

Ankh HTTP Response

Link to this section Summary

Types

Response status

t()

Link to this section Types

Specs

status() :: non_neg_integer()

Response status

Specs

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)

Specs

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

fetch_header_values(map, name)

Specs

fetch_header_values(t(), Ankh.HTTP.header_name()) :: [Ankh.HTTP.header_value()]
Link to this function

fetch_trailer_values(map, name)

Specs

fetch_trailer_values(t(), Ankh.HTTP.header_name()) :: [Ankh.HTTP.header_value()]
Link to this function

new(attrs \\ [])

Specs

new(keyword()) :: t()
Link to this function

put_header(response, name, value)

Specs

put_header(t(), Ankh.HTTP.header_name(), Ankh.HTTP.header_value()) :: t()
Link to this function

put_headers(response, headers)

Specs

put_headers(t(), Ankh.HTTP.headers()) :: t()
Link to this function

put_trailer(response, name, value)

Specs

put_trailer(t(), Ankh.HTTP.header_name(), Ankh.HTTP.header_value()) :: t()
Link to this function

put_trailers(response, trailers)

Specs

put_trailers(t(), Ankh.HTTP.headers()) :: t()
Link to this function

set_body(response, body)

Specs

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

set_status(response, status)

Specs

set_status(t(), status()) :: t()