[][src]Function oc_http::respond

pub async fn respond<S>(stream: &mut S, response: Response) -> Result<()> where
    S: AsyncWrite + Unpin

Respond writes the provided response to the stream; this should be called before any part of the body is written. After being called, the body can be written directly to the stream.