jiveapi.jiveresponse module¶
-
class
jiveapi.jiveresponse.JiveResponse[source]¶ Bases:
requests.models.ResponseSubclass of
requests.Responseto handle automatically trimming the JSON Security String from the beginning of Jive API responses.-
json(**kwargs)[source]¶ Returns the json-encoded content of a response, if any, with the leading JSON Security String stripped off.
Parameters: kwargs – Optional arguments that json.loadstakes.Raises: ValueError – If the response body does not contain valid json.
-
-
jiveapi.jiveresponse.requests_hook(response, **_)[source]¶ requests.Sessionresponsehook to returnJiveResponseobjects instead of plainrequests.Responseobjects.Add this to a
requests.Sessionlikesession.hooks['response'].append(requests_hook)