Angelo Gladding
Hacker for right homesteading an independent web.
angelo@ragt.ag@clpd@ragt.ag@angelo@ragt.ag

web/headers

HTTP headers


get_header(header, value=None) # [source]

Headers(**headers) # [source]

a dot-mapping optimized to hold HTTP header objects

>>> h = Headers(**{"content_type": "text/plain", "CONTENT-LENGTH": "555"})
>>> h["content-type"]
text/plain
>>> h["content-length"]
555
>>> h.content_type
text/plain
>>> type(h.content_type)
<class 'web.headers.entity.ContentType'>