Apr-02-2019, 09:25 AM
Error:Traceback (most recent call last):
File "/root/DNSaaS.py", line 497, in requestToken
response, content = h.request(target.geturl(), 'POST', json.dumps(msgJson), headers)
File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py", line 2135, in request
cachekey,
File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py", line 1796, in _request
conn, request_uri, method, body, headers
File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py", line 1737, in _conn_request
response = conn.getresponse()
File "/usr/lib/python2.7/httplib.py", line 1108, in getresponse
raise ResponseNotReady()
ResponseNotReady
def requestToken(self, user, password, tenant): """ Method responsible ask for a token. :param user: User name :param password: Password :param tenant: Tenant name :rtype : object """ headers = { 'Accept': 'application/json', 'Content-Type': 'application' } target = urlparse(self.__apiurlAAA) h = http.Http() msgJson = {"auth": {"tenantName": tenant, "passwordCredentials": {"username": user, "password": password}}} try: response, content = h.request(target.geturl(), 'POST', json.dumps(msgJson), headers) except: traceback.print_ex() return -1, "Server API not reachable,chega aqui " response_status = response.get("status") return response_status, contentHello, someone can help me with these errors, I'm trying to make the orders with the postman?
Thanks