Response¶
-
class
sdklib.http.response.
AbstractBaseHttpResponse
(resp)[source]¶ Bases:
object
Wrapper of Urllib3 HTTPResponse class needed to implement any HttpSdk response class.
See Urllib3.
-
headers
¶ Returns a dictionary of the response headers.
-
urllib3_response
= None¶
-
-
class
sdklib.http.response.
Api11PathsResponse
(resp)[source]¶ Bases:
sdklib.http.response.AbstractBaseHttpResponse
,sdklib.http.response.JsonResponseMixin
This class models a response from any of the endpoints in most of 11Paths APIs.
It consists of a “data” and an “error” elements. Although normally only one of them will be present, they are not mutually exclusive, since errors can be non fatal, and therefore a response could have valid information in the data field and at the same time inform of an error.
-
data
¶ Returns: data part of the API response into a dictionary
-
error
¶ @return Error the error part of the API response, consisting of an error code and an error message
-
-
class
sdklib.http.response.
HttpResponse
(resp)[source]¶ Bases:
sdklib.http.response.Response
,sdklib.http.response.AbstractBaseHttpResponse
Wrapper of Urllib3 HTTPResponse class compatible with AbstractBaseHttpResponse.
See Urllib3.
-
reason
¶
-
-
class
sdklib.http.response.
Response
(headers=None, status=None, status_text=None, http_version=None, body=None)[source]¶ Bases:
sdklib.http.response.JsonResponseMixin
-
body
¶
-
data
¶
-
headers
¶ Returns a dictionary of the response headers.
-
html
¶ Returns HTML response data.
-
http_version
¶
-
raw
¶ Returns urllib3 response data.
-
status
¶
-
status_text
¶
-
xml
¶
-