http://www.nhtsa.gov/webapi/api/Recalls/vehicle/modelyear/1997/make/EXISS%2FSOONER?format=json
用下划线替换&符不再导致错误消息,但返回的结果为零,这不应该是这种情况。
原始邮件:
我尝试从以下网址下载内容:
http://www.nhtsa.gov/webapi/api/Recalls/vehicle/modelyear/1997/make/s&s?format=json
该网站返回以下错误消息:
Server Error in '/' Application.
A potentially dangerous Request.Path value was detected from the client (&).
问题是&符号;对不同汽车的类似要求使作品:
http://www.nhtsa.gov/webapi/api/Recalls/vehicle/modelyear/1997/make/toyota?format=json
我已经从不同的端点验证了S& S是API的有效品牌。
根据stackoverflow答案,我已经尝试了以下所有内容但没有成功:
http://www.nhtsa.gov/webapi/api/Recalls/vehicle/modelyear/1997/make/s%26s?format=json
http://www.nhtsa.gov/webapi/api/Recalls/vehicle/modelyear/1997/make/s%26amp;s?format=json
http://www.nhtsa.gov/webapi/api/Recalls/vehicle/modelyear/1997/make/s%26amp%3Bs?format=json