Skip to main content

serialize_response

Function serialize_response 

Source
pub fn serialize_response(resp: &HttpResponse) -> Vec<u8> ⓘ
Expand description

Serialize a response to bytes: status line, the response’s headers (minus the writer-owned ones), an accurate Content-Length, Connection: close, the blank line, then the body — the one-shot form of serialize_response_conn.