Jan-31-2019, 06:12 AM
Hello everyone,
While working with HTTP headers in python, am usually faced with the situation of setting or requesting for some common header information; be it
I was wondering if the python standard library (or any other library) defines constants for these headers' names, so that the developer need not type out the string equivalent for them.
I came across this in the Rust documentation: https://docs.rs/http/0.1.15/http/header/...#constants, which is exactly what I would like to see in the Python library.
Any suggestions on where I can look for this? I didn't have any luck doing a web search, or via the python console.
Thank you,
Kiran
While working with HTTP headers in python, am usually faced with the situation of setting or requesting for some common header information; be it
headers.get('Host')or something similar.
I was wondering if the python standard library (or any other library) defines constants for these headers' names, so that the developer need not type out the string equivalent for them.
I came across this in the Rust documentation: https://docs.rs/http/0.1.15/http/header/...#constants, which is exactly what I would like to see in the Python library.
Any suggestions on where I can look for this? I didn't have any luck doing a web search, or via the python console.
Thank you,
Kiran