Closed minijackson closed 5 months ago
As specified in this seanmonstar/reqwest#630 response headers
implementation is not officially supported in reqwest
.
web_sys
should be used for every request to be sure of wasm support.
I guess someone broke it recently.
Hey @minijackson,
Could you retry your app with this branch and let me know if everything works: https://github.com/meilisearch/meilisearch-rust/pull/582 I’m struggling to run the example in this repo
Description
Hello! I'm building a wasm app using meilisearch-sdk, and found this confusing error when calling
Client::new
:Expected behavior
Client::new
does not panic.Current behavior
Turns out it's
http
's way of telling us that a header name is capitalized, and panics.Here's the
http
code that panics (HeaderName::from_static
):https://github.com/hyperium/http/blob/v1.1.0/src/header/name.rs#L1197-L1224
And I think the
X-Meilisearch-Client
is what causes it:https://github.com/meilisearch/meilisearch-rust/blob/v0.26.0/src/reqwest.rs#L35
Environment (please complete the following information):