嗨,我正在尝试向API发送post请求,如下所示: https://www.cpaaustralia.com.au/api/FindACpa/SearchApi.mvc/ExecuteSearch
以下是JSON数据:
{"Point":{"Latitude":"-27.67361480","Longitude":"153.18297950"},"LocationText":"4000 Pacific Hwy, Loganholme QLD 4129, Australia","PostCode":"4129","Locality":"Loganholme","CountryCode":"AU"}
这是一个scrapy shell请求:
req=Request("https://www.cpaaustralia.com.au/api/FindACpa/SearchApi.mvc/ExecuteSearch",method="POST",headers={"user-agent":"Mozilla 5.0"},body=json.dumps(data))
此请求应在响应中返回JSON数据,但不会得到JSON响应。而是得到一个错误页面。你知道吗
请告诉我解决办法
在对JSON发出POST请求时,您已经从Find a CPA页面中删除了
__RequestVerificationToken
,并更新了头中的__RequestVerificationToken
。你知道吗查找CPA页:https://www.cpaaustralia.com.au/FindACpa/Locate.mvc/Index
输出:
相关问题 更多 >
编程相关推荐