pub fn write_response(
status: u16,
reason: &str,
headers: &[(&str, &str)],
dst: &mut [u8],
) -> Result<usize, HttpError>Expand description
Write an HTTP/1.1 response into a byte buffer. Returns bytes written.
Returns HttpError::BufferTooSmall if dst is undersized.
Use response_size to compute the exact size needed.