rbtools.api.decode¶
API payload decoders.
Module Attributes
Mapping from API format to decoder method. |
Functions
|
Default decoder for API payloads. |
|
Decode an application/json-encoded API response. |
|
Decode a Web API response. |
- rbtools.api.decode.DefaultDecoder(payload: Union[bytes, str]) Dict [source]¶
Default decoder for API payloads.
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.
- rbtools.api.decode.JsonDecoder(payload: Union[bytes, str]) Dict [source]¶
Decode an application/json-encoded API response.