Jeremiah Senkpiel

Results 518 comments of Jeremiah Senkpiel

I've made a PR for ```rust pub fn with_http_client(http_client: C) -> Client ``` since that seems easy enough to do and I'm pretty sure the existing public `Arc`-taking one nobody...

The more I think about this, the better of an idea it seems. I propose we do the following: - `Client::new(AsRef)` - `Client::default()` where no internal base url is set....

Huh. Yes, @goto-bus-stop is correct, this was last published from my Windows desktop.

The correct solution here is a middleware, although that may presently be a bit challenging. https://github.com/http-rs/surf/issues/192 proposes things related to this, namely potential middleware re-use and non-consumption of `surf::Request`. _Edit:...

@ptechen Have you enabled any features from surf, perhaps changing the default client? What header is this and where does the error come from?

I _think_ for now you can use a bin-level overload to deal with this?

Oh, If you are making a crate, I suggest you expose your own feature flag for wasm, and proxy the feature setting to Surf. It's not exactly ideal, but this...

I mean, have your crate expose it's own `wasm` feature, which then configures Surf.

> Honestly, it'd be nice if we have a generic HTTP client trait that crates could use so that it wouldn't matter what HTTP client the caller is using with...

@mmstick This is literally what Surf does for `http-client`. I do not follow.