Skip to main content

build_response

Function build_response 

Source
pub fn build_response(
    body: &Body,
    status: u16,
    media_type: &str,
    headers: &Headers,
    request_headers: &Headers,
    method: &str,
    policy: EtagPolicy,
) -> Result<ResponseParts, LinoHttpError>
Expand description

Encode a value as the negotiated representation.

ยงErrors

A 412 or a 428 when a precondition fails, and a 500 when the value cannot be encoded as the negotiated representation.