http-rs / surf

Fast and friendly HTTP client framework for async Rust
https://docs.rs/surf
Apache License 2.0
1.45k stars 119 forks source link

Headers on a http_types::Request are not sent #220

Closed jbr closed 3 years ago

jbr commented 3 years ago
    let mut request = http_types::Request::new(
        http_types::Method::Get,
        http_types::Url::parse("configure this").unwrap(),
    );

    request.insert_header("some", "header");

    // does not send the header
    surf::Client::new().send(request).await?;

    // does send the header
    http_client::h1::H1Client::new().send(http_request).await?.into()

the server does not see the some: header header when sending through surf, but it does when sending through http_client. discovered on surf main branch