Open tarunchhabra26 opened 8 years ago
you are getting a Python tuple containing a siesta.Resource along with the "raw" HTTPResponse.
you want something like:
api_resource, http_response = api.users.get()
then
print(http_response.read())
not sure if siesta provides overrides for printing its resources. if it does you could also try print(api_resource)
Hello,
If your response is in json format, you can easily get it:
ret, resp = api.users.get() print(ret.attrs)
With normal print statement I just get this as response : (<siesta.Resource object at 0x102051dd0>, <httplib.HTTPResponse instance at 0x10205b5a8>)
I wish to print as a string. Sorry, I am new to python.