Skip to main content

stream_responses

Function stream_responses 

Source
pub async fn stream_responses(
    session: &str,
    req: &Request,
    auto_spawn: bool,
    on_line: impl FnMut(&str, Stream, &str),
) -> Result<Response, ClientError>
Expand description

Send a request and read streaming responses until LogEnd or error. Calls on_line for each LogLine received. Returns the terminal response.