This class implements a Getter that enables extracting propagated fields from a carrier.
Function that can retrieve zero or more values from the carrier. In the case that the value does not exist, returns None.
exist.
This class implements a Setter that enables injecting propagated fields into a carrier.
Function that can set a value into a carrier””
Bases: Getter
[Mapping
[str
, Union
[List
[str
], str
]]]
Getter implementation to retrieve a value from a dictionary.
Bases: ABC
This class provides an interface that enables extracting and injecting context into headers of HTTP requests. HTTP frameworks and clients can integrate with TextMapPropagator by providing the object containing the headers, and a getter and setter function for the extraction and injection of values, respectively.
Create a Context from values in the carrier.
The extract function should retrieve values from the carrier object using getter, and use values to populate a Context value and return it.
getter (Getter
[TypeVar
(CarrierT
)]) – a function that can retrieve zero or more values from the carrier. In the case that the value does not exist, return an empty list.
carrier (TypeVar
(CarrierT
)) – and object which contains values that are used to construct a Context. This object must be paired with an appropriate getter which understands how to extract a value from it.
context (Optional
[Context
]) – an optional Context to use. Defaults to root context if not set.
A Context with configuration found in the carrier.
Inject values from a Context into a carrier.
inject enables the propagation of values into HTTP clients or other objects which perform an HTTP request. Implementations should use the Setter ‘s set method to set values on the carrier.
carrier (TypeVar
(CarrierT
)) – An object that a place to define HTTP headers. Should be paired with setter, which should know how to set header values on the carrier.
context (Optional
[Context
]) – an optional Context to use. Defaults to current context if not set.
setter (Setter
[TypeVar
(CarrierT
)]) – An optional Setter object that can set values on the carrier.
Gets the fields set in the carrier by the inject method.
If the carrier is reused, its fields that correspond with the ones present in this attribute should be deleted before calling inject.
A set with the fields set in inject.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4