I'm writing wrapper for REST API and use requests module.
Method .json()
of Response object transfers **kwargs
to json.loads()
function, so I can easily use custom JSON decoder and, i. e. transparently convert UNIX epoch timestamps to datetime.datetime objects.
Is there any way to use custom JSON encoder with Request object? Seems I can only use parameter json, but can't find how to use custom JSON encoder with it.