Skip to main content

write_response

Function write_response 

Source
pub fn write_response<W: Write>(w: &mut W, resp: Response) -> Result<()>
Expand description

Write a response to the stream. Always closes the connection (no keep-alive) to keep the server stateless and simple. Takes the response by value so a streaming body’s FnOnce producer can be invoked.