async fn query_log_stream(
    client: client::Client,
    filter: impl ToString,
) -> (JoinHandle<Vec<serde_json::Value>>, oneshot::Sender<()>) {
    let filter = filter.to_string();

    // start the request
    let req = client
        .request_body(
            client
                .request_builder(PATH)
                .method("QUERY")
                .body(hyper::Body::from(filter))
                .unwrap(),
        )
        .await;
    assert_eq!(req.status(), http::StatusCode::OK);
    // spawn a task to collect and parse all the logs
    collect_logs(req.into_body())
}
/// Start a log stream with a QUERY request
Start a log stream with a QUERY request
Start a log stream with a QUERY request
async fn query_log_stream(
    client: client::Client,
    filter: impl ToString,
) -> (JoinHandle<Vec<serde_json::Value>>, oneshot::Sender<()>) {
    let filter = filter.to_string();
    // start the request
    let req = client
        .request_body(
            client
                .request_builder(PATH)
                .method("QUERY")
                .body(hyper::Body::from(filter))
                .unwrap(),
        )
        .await;
    assert_eq!(req.status(), http::StatusCode::OK);
    // spawn a task to collect and parse all the logs
    collect_logs(req.into_body())
}
async fn query_log_stream ( client : client :: Client , filter : impl ToString , ) -> ( JoinHandle < Vec < serde_json :: Value > > , oneshot :: Sender < ( ) > ) { let filter = filter . to_string ( ) ; // start the request let req = client . request_body ( client . request_builder ( PATH ) . method ( " " ) . body ( hyper :: Body :: from ( filter ) ) . unwrap ( ) , ) . await ; assert_eq ! ( req status ( ) http StatusCode OK ) ; // spawn a task to collect and parse all the logs collect_logs ( req . into_body ( ) ) }
Start a log stream with a QUERY request
Start a log stream with a QUERY request
client
client::Client
filter
impl ToString