Hi
Please see if i am doing something wrong in the command below
C:\Windows\system32>curl -i -k -X POST -H "Content-Type: application/json"
-d '{
"wifiAccessPoints": [{"macAddress": "01:23:45:67:89:ab"}]}'
https://location.ser
vices.mozilla.com/v1/geolocate?key=test
curl: (3) [globbing] bad range specification in column 2
curl: (3) [globbing] unmatched close brace/bracket in column 18
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=UTF-8
Date: Mon, 23 Mar 2015 13:41:35 GMT
Server: nginx
Content-Length: 134
Connection: keep-alive
{"error": {"code": 400, "message": "Parse Error", "errors": [{"domain":
"global"
, "message": "Parse Error", "reason": "parseError"}]}}
Regards
Anuj Chauhan
On Mon, Mar 23, 2015 at 6:54 PM, Hanno Schlichting <[email protected]
> wrote:
> 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
>
_______________________________________________
dev-geolocation mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-geolocation