Add a method for user to delete one of headers from a request #3037
Unanswered
NewUserHa
asked this question in
Potential Issue
Replies: 2 comments
-
Related to #152 |
Beta Was this translation helpful? Give feedback.
0 replies
-
For my use case, I need to remove the Right now, I'm doing this with: httpx_client = httpx.AsyncClient()
del httpx_client.headers["Accept"] Instead, it would be nice if this were possible: httpx_client = httpx.AsyncClient(headers={"Accept": None}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, users can't make a header not to send out in
httpx
, in practice, likerefer:
origin:
X-Requested-With:
is not needed for some requests.it should allow:
to archive the same behavior of
requests
(handle with merge_setting() from prepare_request() of Session() in seesion.py)Perhaps should make
normalize_header_value()
ofHeaders()
in '_models.py' to supportNone
to fixsince
_merge_headers()
ofbuild_request
instance both 'session.headers' and 'headers' argument toHeaders()
beforeupdate()
?(also here should avoid re-instance the
self.headers
multiple times since it already isHeaders()
?)Beta Was this translation helpful? Give feedback.
All reactions