Class HeaderModifier (0.2.1)

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

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

Attributes

NameDescription
set Mapping[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 Mapping[str, str]
Add the headers with given map where key is the name of the header, value is the value of the header.
remove Sequence[str]
Remove headers (matching by header names) specified in the list.

Inheritance

builtins.object > proto.message.Message > HeaderModifier

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.