Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fb36768

Browse files
author
Michael Bianchi
committed
Add generic make request
1 parent 9aea577 commit fb36768

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎pingdomWrapper.py‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ def _make_request(self, endpoint, method, query_params=None, body=None):
185185
raise AuthenticationError(resp_json)
186186
except ValueError:
187187
raise
188+
189+
# TODO handle rate limiting gracefully
188190

189191
# Raises HTTP error if status_code is 4XX or 5XX
190192
elif r.status_code >= 400:
@@ -262,6 +264,15 @@ def _pprint_response(self, r):
262264
)
263265
)
264266

267+
def make_request(
268+
self,
269+
endpoint,
270+
method,
271+
query_params=None,
272+
body=None
273+
):
274+
return self._make_request(endpoint, method, query_params, body)
275+
265276
def list_checks(
266277
self,
267278
tags=[],

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /