Pass multiple values of headers using list or tuple #1664
Unanswered
GeekDuanLian
asked this question in
Ideas
Replies: 1 comment 1 reply
-
|
I'm probably in favour of this, yes. There are a few cases which shouldn't concatenate, but should instead result in multiple headers. Eg... https://github.com/bnoordhuis/mozilla-central/blob/master/netwerk/protocol/http/nsHttpHeaderArray.h#L185 |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
For example, the
Acceptheader may have multiple values.Can pass multiple values like this:
s.get('xxx', headers={'Accept': ['text/html', 'application/json']})Which is equivalent to:
s.get('xxx', headers={'Accept': 'text/html, application/json'})But more pythonic.
Beta Was this translation helpful? Give feedback.
All reactions