HeaderModifier(mapping=None, *, ignore_unknown_fields=False, **kwargs)
The specification for modifying HTTP header in HTTP request and HTTP response.
Attributes | |
---|---|
Name | Description |
set |
MutableMapping[str, str]
Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header. |
add |
MutableMapping[str, str]
Add the headers with given map where key is the name of the header, value is the value of the header. |
remove |
MutableSequence[str]
Remove headers (matching by header names) specified in the list. |
Classes
AddEntry
AddEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)
The abstract base class for a message.
Parameters | |
---|---|
Name | Description |
kwargs |
dict
Keys and values corresponding to the fields of the message. |
mapping |
Union[dict,
A dictionary or message to be used to determine the values for this message. |
ignore_unknown_fields |
Optional(bool)
If True, do not raise errors for unknown fields. Only applied if |
SetEntry
SetEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)
The abstract base class for a message.
Parameters | |
---|---|
Name | Description |
kwargs |
dict
Keys and values corresponding to the fields of the message. |
mapping |
Union[dict,
A dictionary or message to be used to determine the values for this message. |
ignore_unknown_fields |
Optional(bool)
If True, do not raise errors for unknown fields. Only applied if |