|
|
|
|
26
|
elif isinstance(verify_cert, str): # alternative: path to local cert is given as string
|
26
|
elif isinstance(verify_cert, str): # alternative: path to local cert is given as string
|
27
|
self.verify_cert = verify_cert # see requests-documentation for more info
|
27
|
self.verify_cert = verify_cert # see requests-documentation for more info
|
28
|
|
28
|
|
29
|
- def set_http_auth(self, http_auth): # credentials should be given as list containing two elements
|
|
|
30
|
- if len(http_auth == 2): # first: username, second: password for http-basic auth
|
|
|
31
|
- self.http_auth = (str(http_auth[0]), str(http_auth[1]))
|
|
|
|
|
29
|
+ def set_http_auth(self, http_auth): # credentials should be given as list containing two string-elements
|
|
|
30
|
+ if len(http_auth) == 2: # first: username, second: password for http-basic auth
|
|
|
31
|
+ self.http_auth = (str(http_auth[0]), str(http_auth[1])) # ensure right format of credentials
|
32
|
|
32
|
|
33
|
def _query(self, uri, method, kwargs=None):
|
33
|
def _query(self, uri, method, kwargs=None):
|
34
|
headers = {
|
34
|
headers = {
|