Endpoint请求返回404 not found for uberapi沙盒环境

2024-05-17 11:36:07 发布

您现在位置:Python中文网/ 问答频道 /正文

沙盒中的Uber apirequests端点的响应如下:

u'<html><title>404: Not Found</title><body>404: Not Found</body></html>'。在

对于沙盒,我使用端点:

https://sandbox-api.uber.com/v1/sandbox/requests

如果我使用uber prod endpoint,同样的请求也能正常工作

https://api.uber.com/v1/requests

我使用python requests lib for api:

^{pr2}$

就像我说的,如果我把网址改成uber prod environment,这也行得通:

 res = requests.post('https://api.uber.com/v1/requests',
                      data=json.dumps(params), headers=headers)

Tags: httpscom沙盒apititlehtmlnotbody