[HERE MAPS一线URL WLAN地理位置

问题描述 投票:0回答:1

亲爱的

以下示例为HERE MAPS反向定位行成功构建了一个行URL]

https://reverse.geocoder.ls.hereapi.com/6.2/reversegeocode.json?apiKey=“ API_Key”&mode = retrieveAddresses&prox = 30.2509399,29.6754403,250

但是在尝试获得Wlan地理位置工作时,我遇到了一个问题,需要您的帮助,我在下一页中阅读了Wlan地理位置指南

https://developer.here.com/documentation/positioning/dev_guide/topics/example-wlan.html

我尝试根据《 WLAN地理位置指南》中提到的以下数据构造一个行URL。

https://pos.ls.hereapi.com/positioning/v1/locate?apiKey= {YOUR_API_KEY}

{“ wlan”:[{“ mac”:“ 8C-1A-BF-20-66-AD”},{“ mac”:“ A0-E4-53-E9-66-A7”},{“ mac“:” AC-4B-C8-34-F7-01“},{” mac“:” A0-21-95-57-79-06“},{{mac”:“ 00-18-56- 51-54-FB“},{” mac“:” 10-30-47-D2-54-55“},{” mac“:” B8-6B-23-09-87-B1“},{ mac“:” F4-55-95-11-2C-C1“}}]]

我得到的URL行如下,但是当我通过浏览器发送它时,出现以下错误

https://pos.ls.hereapi.com/positioning/v1/locate?apiKey=“ API_Key”,headers ='Content-type':'application / json',data =“ wlan”:[\ n {“ mac”:“ 8C-1A-BF-20-66-AD” },\ n {“ mac”:“ A0-E4-53-E9-66-A7”},\ n {“ mac”:“ AC-4B-C8-34-F7-01”},\ n {“ mac“:” A0-21-95-57-79-06“},\ n {” mac“:” 00-18-56-51-54-FB“},\ n {” mac“:” 10- 30-47-D2-54-55“},\ n {” mac“:” B8-6B-23-09-87-B1“},\ n {” mac“:” F4-55-95-11- 2C-C1“} \ n]

错误输出

{“ error”:{“ code”:405,“ message”:“不允许的方法”,“ description”:“仅支持HTTP POST方法”}}

请提供我正确的网址格式,需要我的支持

谢谢你和Br

亲爱的,成功为HERE MAPS反向定位行构造了一个行URL,以下示例https://reverse.geocoder.ls.hereapi.com/6.2/reversegeocode.json?apiKey=“ API_Key”&...

c esp8266
1个回答
0
投票

[如果使用浏览器,则尝试访问需要HTTP POST请求和HTTTP GET请求的API端点。因此,API会引发错误。您粘贴到浏览器地址栏中的所有URL都将变成GET请求。

如果您想在本地测试API,则可以尝试使用邮递员或curl等工具来发送请求。我建议您阅读一些有关HTTP方法的知识,并研究提到的工具。

© www.soinside.com 2019 - 2024. All rights reserved.