Skip to content

python REST API connection failure #2908

@ghost

Description

I am trying to access my parse-server from a python code as below

`import json,httplib
import urllib

connection = httplib.HTTPSConnection("domain.com/mount_path",port)
connection.connect()
connection.request('GET', '/classes/className?%s' % params, '', {
"X-Parse-Application-Id": "####",
"X-Parse-REST-API-Key": "####",
})

result = json.loads(connection.getresponse().read())
print(result)`

The error received is
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1270, in connect
HTTPConnection.connect(self)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 836, in connect
self.timeout, self.source_address)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 557, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

Any pointers please.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions