我几乎从解析文档中复制并粘贴了以获得服务器信息:
import json
import http.client
conn = http.client.HTTPSConnection('parseapi.back4app.com', 443)
conn.connect()
conn.request('GET', '/APP/users/ObjectID', '', {
"X-Parse-Application-Id": 'AppID',
"X-Parse-REST-API-Key": 'REST_API_kkey'
})
result = json.loads(conn.getresponse().read())
print (result)
但是我一直得到这个结果:
{'message': 'Not Found', 'error': {}}
答案 0 :(得分:0)
我认为网址可能是一个问题,下面的代码对我有用
import json,http.client as httplib
connection = httplib.HTTPSConnection('parseapi.back4app.com', '443')
connection.connect()
connection.request('GET', '/users', '', {
"X-Parse-Application-Id": "AppID",
"X-Parse-REST-API-Key": "REST_KEY"
})
result = json.loads(connection.getresponse().read())
print(result)
让我知道它是否有效:)