A better Rust ATProto crate
1

Configure Feed

Select the types of activity you want to include in your feed.

at main 662 B View raw
1#![cfg(all(feature = "streaming", feature = "reqwest-client"))] 2 3use jacquard_common::http_client::HttpClientExt; 4 5#[tokio::test] 6async fn reqwest_client_can_stream_response() { 7 let client = reqwest::Client::new(); 8 9 let request = http::Request::builder() 10 .uri("https://www.rust-lang.org/") 11 .body(vec![]) 12 .unwrap(); 13 14 let response = client.send_http_streaming(request).await.unwrap(); 15 // Just verify we got a response - the fact that it didn't error means the streaming works 16 assert!( 17 response.status().is_success() || response.status().is_redirection(), 18 "Status: {}", 19 response.status() 20 ); 21}