We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept
I've been using reqwest and I've noticed that it sends the Accept header despite me not manually setting this header.
There also seems to be no way to remove this header as it is is stored in the ClientBuilder's config.
ClientBuilder
The text was updated successfully, but these errors were encountered:
@Ssaely It's true that you can't delete the ACCEPT header, but you can replace its value in the ClientBuilder:
use reqwest::{Client,header::{HeaderMap,HeaderValue,ACCEPT}}; let mut headers = HeaderMap::new(); headers.insert(ACCEPT, HeaderValue::from_static("application/json")); let client = Client::builder() .default_headers(headers) .build()?;
It's usually useful to set this header. If you're a Rust fan, think of it as adding type-checking to HTTP :-)
Sorry, something went wrong.
No branches or pull requests
I've been using reqwest and I've noticed that it sends the
Accept
header despite me not manually setting this header.There also seems to be no way to remove this header as it is is stored in the
ClientBuilder
's config.The text was updated successfully, but these errors were encountered: