rbtools.api.decode¶
API payload decoders.
Module Attributes
Mapping from API format to decoder method. |
Functions
|
Decode API payloads with no supported type. |
|
Decode an application/json-encoded API response. |
|
Decode a Web API response. |
- rbtools.api.decode.DECODER_MAP = {'application/json': <function JsonDecoder>}[source]¶
Mapping from API format to decoder method.
Type: dict
- rbtools.api.decode.DefaultDecoder(payload: bytes | str) JSONDict[source]¶
Decode API payloads with no supported type.
The default decoder is used when a decoder is not found in the DECODER_MAP. This will stick the body of the response into the ‘data’ field.