Allow to set the user-agent on wasm target #2016
Labels
E-easy
Effort: Easy! Start here :D
E-pr-welcome
The feature is welcome to be added, instruction should be found in the issue.
Currently
reqwest
provide the methodClientBuilder::user_agent(..)
to set theUser-Agent
header.But this method does not exist when targeting
wasm32-unknown-unknown
.Steps to reproduce
I've the following
src/lib.rs
:and the following
Cargo.toml
:When I execute
cargo check --target wasm32-unknown-unknown
, I get the following error:What I'm expecting
I would like that
reqwest::wasm::ClientBuilder
provide the methoduser_agent(..)
to set theUser-Agent
headerCurrent workaround
reqwest::wasm::ClientBuilder
providedefault_headers(..)
so I can use it to setUser-Agent
The text was updated successfully, but these errors were encountered: