No-Retry Requestor¶
-
class
moco_wrapper.util.requestor.
NoRetryRequestor
¶ This requestor works along the same lines as the
moco_wrapper.util.requestor.DefaultRequestor
, but when this requestor comes along the http code 429 for too many requests it just returns an error response.Use this requestor if you write integration tests or dont have time for retrying the ressource.
Example usage:
from moco_wrapper.util.requestr import NoRetryRequestor from moco_wrapper import Moco no_retry = NoRetryRequestor() m = Moco( requestor = no_retry )
-
request
(method, path, params=None, data=None, **kwargs)¶ Request the given ressource
Parameters: - method (str) – HTTP Method (eg. POST, GET, PUT, DELETE)
- path (str) – Path of the ressource (e.g.
/projects
) - params (dict) – Url parameters (e.g.
page=1
, query parameters) - data (dict) – Dictionary with data (http body)
- kwargs – Additional http arguments.
Returns: Response object
-
session
¶ Http Session this requestor uses
-