0

It was successful to construct  one line URL for the HERE MAPS reverse positing line the following example

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

But while trying  to get Wlan geo location work, I am facing a problem and need your help, I read the guide for Wlan geo location in the following page

I tried to construct one line URL from the following data which mentioned in the WLAN geo location Guide

 

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"}  ]}

 

The URL line I got is as follow , but when I send it troughs my browser I got the following error

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 output

{"error":{"code":405,"message":"Method Not Allowed","description":"Only HTTP POST method supported"}}
```                           
Wahyu Kristianto
  • 8,719
  • 6
  • 43
  • 68

1 Answers1

0

If you use your browser, you are trying to access an API endpoint that requires an HTTP POST request with an HTTTP GET request. The API therefore throws an error. All URLs that you paste into the address line of your browser get turned into GET requests.

If you want to test the API locally you can try tools such as postman or curl to send your request. I recommend you read up a little about HTTP Methods and look into the mentioned tools.

samy
  • 1,396
  • 2
  • 19
  • 41