Python Forum
HTTP Headers as constants in stdlib
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HTTP Headers as constants in stdlib
#3
Thanks for the response.
Am aware of the requests, and httpie libraries.

I think I need to elaborate, on my original query.
I want to refer to the Http headers as constants, and not as strings. So, for example
headers.get(http.HOST)
. This will eliminate a class of typo errors, and also not require one to remember the exact spelling of the Http header. Should it be referer or referrer, and does case matter, etc.

Therefore, was wondering if there is a module, like the http one referred above, (stdlib or otherwise), that could help with this.
Reply


Messages In This Thread
HTTP Headers as constants in stdlib - by kirans - Jan-31-2019, 06:12 AM
RE: HTTP Headers as constants in stdlib - by kirans - Jan-31-2019, 10:03 AM
RE: HTTP Headers as constants in stdlib - by nilamo - Jan-31-2019, 04:30 PM
RE: HTTP Headers as constants in stdlib - by wavic - Jan-31-2019, 05:37 PM
RE: HTTP Headers as constants in stdlib - by wavic - Feb-02-2019, 10:52 AM
RE: HTTP Headers as constants in stdlib - by kirans - Feb-03-2019, 03:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Extracting Headers from Many Pages Quickly OstermanA 2 2,030 Oct-01-2019, 08:01 AM
Last Post: OstermanA

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020