On 23.03.2015, at 13:52 , anuj chauhan <[email protected]> wrote:
> I am testing my module "finding location of wifi" and running following
> command on curl
>
> curl -i -k -X POST -H "Content-Type: application/json" -d '{"wifi":
> [{"key": "01:23:45:67:89:ab"}]}'
> https://location.services.mozilla.com/v1/search?key=test
>
> I am getting following error while running this command
>
> {"errors": [{"description": "Expecting value: line 1 column 1 (char 0)",
> "name":
> null}]}
>
> What the problem in json body in the command?
That's really odd. If I run the same query against MLS, I get back a proper
response.
Unrelated, the search API is deprecated. If you write new code, please use the
geolocate API instead. So your query would be:
curl -i -k -X POST -H "Content-Type: application/json" -d '{"wifiAccessPoints":
[{"macAddress": "01:23:45:67:89:ab"}]}'
https://location.services.mozilla.com/v1/geolocate?key=test
Also note that when querying for Wifi networks, we never answer a query based
on a single Wifi network with Wifi based information, so you'll likely get back
a GeoIP based position. You need to send us at least two nearby Wifi networks
and we have to know both of them to return Wifi based position information
back. Also make sure that you filter out any hidden Wifi networks or those with
a SSID ending in "_nomap" from your queries.
Hanno
_______________________________________________
dev-geolocation mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-geolocation