class Headers(typing.MutableMapping[str, str]):
Method | __contains__ |
Undocumented |
Method | __delitem__ |
Remove the header key . |
Method | __eq__ |
Undocumented |
Method | __getitem__ |
Return a single header value. |
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __setitem__ |
Set the header key to value , removing any duplicate entries. Retains insertion order. |
Method | copy |
Undocumented |
Method | encoding.setter |
Undocumented |
Method | get |
Return a header value. If multiple occurrences of the header occur then concatenate them together with commas. |
Method | get_list |
Return a list of all header values for a given key. If split_commas=True is passed, then any comma separated header values are split into multiple return strings. |
Method | items |
Return (key, value) items of headers. Concatenate headers into a single comma separated value when a key occurs multiple times. |
Method | keys |
Undocumented |
Method | multi_items |
Return a list of (key, value) pairs of headers. Allow multiple occurrences of the same key without concatenating into a single comma separated value. |
Method | update |
Undocumented |
Method | values |
Undocumented |
Property | encoding |
Header encoding is mandated as ascii, but we allow fallbacks to utf-8 or iso-8859-1. |
Property | raw |
Returns a list of the raw header items, as byte pairs. |
Instance Variable | _encoding |
Undocumented |
Instance Variable | _list |
Undocumented |
Undocumented
Parameters | |
key:typing.Any | Undocumented |
Returns | |
bool | Undocumented |
Return a single header value.
If there are multiple headers with the same key, then we concatenate them with commas. See: https://tools.ietf.org/html/rfc7230#section-3.2.2
Parameters | |
key:str | Undocumented |
Returns | |
str | Undocumented |
Undocumented
Parameters | |
headers:HeaderTypes | Undocumented |
encoding:str | Undocumented |
key
to value
, removing any duplicate entries.
Retains insertion order.Parameters | |
key:str | Undocumented |
value:str | Undocumented |
Parameters | |
key:str | Undocumented |
default:typing.Any | Undocumented |
Returns | |
typing.Any | Undocumented |
split_commas=True
is passed, then any comma separated header
values are split into multiple return strings.Parameters | |
key:str | Undocumented |
split_commas:bool | Undocumented |
Returns | |
typing.List[ | Undocumented |
(key, value)
items of headers. Concatenate headers
into a single comma separated value when a key occurs multiple times.Returns | |
typing.ItemsView[ | Undocumented |
(key, value)
pairs of headers. Allow multiple
occurrences of the same key without concatenating into a single
comma separated value.Returns | |
typing.List[ | Undocumented |
str
=