File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 16
16
17
17
class Response (object ):
18
18
"""Holds the response from an API call."""
19
+
19
20
def __init__ (self , response ):
20
21
"""
21
22
:param response: The return value from a open call
@@ -57,6 +58,7 @@ def to_dict(self):
57
58
58
59
class Client (object ):
59
60
"""Quickly and easily access any REST or REST-like API."""
61
+
60
62
def __init__ (self ,
61
63
host ,
62
64
request_headers = None ,
@@ -225,6 +227,7 @@ def http_request(*_, **kwargs):
225
227
else :
226
228
data = json .dumps (
227
229
kwargs ['request_body' ]).encode ('utf-8' )
230
+
228
231
if 'query_params' in kwargs :
229
232
params = kwargs ['query_params' ]
230
233
else :
Original file line number Diff line number Diff line change 3
3
4
4
class HTTPError (Exception ):
5
5
''' Base of all other errors'''
6
+
6
7
def __init__ (self , error ):
7
8
self .status_code = error .code
8
9
self .reason = error .reason
You can’t perform that action at this time.
0 commit comments