Class HeaderModifier (0.5.5rc0)

HeaderModifier(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The specification for modifying HTTP header in HTTP request and HTTP response.

Attributes

NameDescription
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
NameDescription
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

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 mapping is a mapping type or there are keyword parameters.

SetEntry

SetEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

Parameters
NameDescription
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

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 mapping is a mapping type or there are keyword parameters.