Skip to main content

send_streaming

Function send_streaming 

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

Issue one request over an OWNED stream and return the status + headers + body reader WITHOUT draining the body (unlike send). Adds Host, Connection: close, and Content-Length; the caller supplies the rest (Accept, Authorization, Content-Type, Mcp-Session-Id, …).