Comments (6)
To be clear:
http_client::native
does not work withdefault-features = false, features = ["h1_client"]
(And should not even be exposed?)
Looks like I mixed up the examples while I was reporting the issue, I meant to post one using http_client::h1::H1Client
there. I've edited the original mensagem to fix this.
from http-client.
Does this work with http-client
pinned to =6.0.0
and async-h1
pinned to =2.0.0
(or =2.1.2
)?
from http-client.
I had to use patch
since these versions were yanked from crates.io, but I think I got it right. Unfortunately neither the async-h1
versions worked. This is what I've tryed on the Cargo.toml
[dependencies]
async-std = { version = "1", features = ["attributes"] }
http-client = { version = "=6.0.0", default-features = false, features = ["h1_client"] }
async-h1 = "=2.1.2"
mockito = "0.29"
testcontainers = "0.12"
[patch.crates-io]
async-h1 = { git = 'https://github.com/http-rs/async-h1', tag = "v2.1.2" }
from http-client.
To be clear: http_client::native
does not work with default-features = false, features = ["h1_client"]
(And should not even be exposed?)
from http-client.
I debugged this issue a little and found that the code
Lines 139 to 144 in db0025d
Line 169 in db0025d
from http-client.
A integration test for this issue could be done using:
#[atest]
async fn fallback_to_ipv4() {
let client = DefaultClient::new();
let _mock_guard = mock("GET", "/")
.with_status(200)
.expect_at_least(2)
.create();
// Kips the initial "http://127.0.0.1:" to get only the port number
let mock_port = &mockito::server_url()[17..];
let url = &format!("http://localhost:{}", mock_port);
let req = Request::new(http_types::Method::Get, Url::parse(url).unwrap());
client.send(req.clone()).await.unwrap();
}
from http-client.
Related Issues (20)
- IsahcClient created without Config ignores the timeout setting.
- The IsahcClient timeout setting is not a connection timeout HOT 1
- HttpsClient::send crashes for IsahcClient
- Dependencies update HOT 2
- impl `HttpClient` also for `Arc<H: HttpClient>` and `Rc<H: HttpClient>`?
- Use send_wrapper for WASM instead of InnerFuture HOT 2
- HttpClient instances should be Clone HOT 1
- Reorganize feature flags to separate out different tls implementations HOT 1
- Incomplete response body using curl-client HOT 1
- Make "fetch" module public HOT 1
- Customizing h1_client e.g. ClientConfig HOT 5
- h1_client: Windows Error 10053 'WSAECONNABORTED'
- Hyper 0.14 support HOT 2
- h1-client: "Connection closed" error when re-using the H1Client for a 2nd request HOT 7
- open design question: some mechanism for handling upgrades HOT 4
- Only pull in the dashmap dep for h1_client
- fix api docs for unstable-config HOT 1
- Stabilize Config
- http-client's future HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from http-client.