【发布时间】:2019-11-12 17:51:34
【问题描述】:
我尝试使用 python 的请求库发出 POST 请求,如下所示:
url = "https://rme.api.here.com/2/matchroute.json?routemode=car&filetype=CSV&app_id={id}&app_code={code}"
response = requests.post(url,data='Datasets/rtHereTest.csv')
我收到代码 400 的响应
{'faultCode': '16a6f70f-1fa3-4b57-9ef3-a0a440f8a42e',
'responseCode': '400 Bad Request',
'message': 'Column LATITUDE missing'}
但是,在我的数据集中,here 我拥有 HERE API 文档中能够进行调用所需的所有标题。
我做错了什么吗,我不太了解 POST 调用或要求,因为 HERE 文档没有明确给出很多示例。
【问题讨论】:
标签: python-3.x python-requests here-api