Skip to main content

send

Function send 

Source
pub fn send<S: Read + Write + ?Sized>(
    stream: &mut S,
    host_header: &str,
    method: &str,
    path: &str,
    headers: &[(&str, &str)],
    body: &[u8],
) -> Result<Response>
Expand description

Issue one request over stream and read the full response. Adds Host, Connection: close, and Content-Length; the caller supplies any other headers (e.g. Authorization, Content-Type).