package shuttle_http
Module Shuttle_http.ResponseSource
t Represents a HTTP 1.1 response.
reason_phrase returns the status reason phrase for the response.
with_body returns a new response where every value is the same as the input response but the body is replaced with the function input.
transfer_encoding returns the inferred transfer encoding based on the response's http headers.
add_transfer_encoding t encoding adds transfer-encoding information to the response headers.
iter_headers t ~f iterates over all response headers and forwards them to the user provided callback.
add_header_unless_exists t ~key ~data returns a response with a new header added to it if the header isn't already present in the response.
add_header t ~key ~data returns a response with a new header added to it.
header t key returns Some data if key is found in the list of response headers. It returns None if the requested header isn't found.
header_multi t key returns a list of all values associated with the response header name. It returns an empty list if the requested header isn't found.
remove_header t key removes all response headers that match the user provided key.