-
-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
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
Request Headers #420
Comments
It makes sense to me. Anyway, can you describe a situation where you would want to completely make the |
not only |
Agree. Need a way to remove default headers by setting them to None. Here's another example: |
this is a huge issue, has anyone found a solution? |
According CURL doc https://curl.se/libcurl/c/CURLOPT_HTTPHEADER.html
All headers with empty value should be removed, without replacing with default headers
If you add a header with no content as in 'Accept:' (no data on the right side of the colon), the internally used header is disabled/removed. With this option you can add new headers, replace internal headers and remove internal headers. To add a header with no content (nothing to the right side of the colon), use the form 'name;' (note the ending semicolon).
But this will not happen. For example
{'Content-Type': ''}
In the request it becomes like
Content-Type:
Headers like
{'Content-Type': None}
Produces a huge number of errors(since you always expect a string)
If I removing the header completely the default Curl header appearing(As it should be according to the documentation).
Content-Type: application/x-www-form-urlencoded
suggest that the correct behavior for
{'Some-Header': None}
is remove headers ( setSome-Header:
for curl), and for{'Some-Header': ''}
is setSome-Header;
(note the ending semicolon).The text was updated successfully, but these errors were encountered: