Tue, 11/08/2016 - 05:19
#1
Some API calls work only in the Browser
When doing a API call I get different results through curl and in the browser. Lets's say I have the following request:
http://open.mapquestapi.com/nominatim/v1/search.php?key=VALID_API_KEY&ad...
In the browser I get the expected result, through curl just "[]" which means an empty result.
With the following request I get the same results in the browser and through curl.
http://open.mapquestapi.com/nominatim/v1/search.php?key=VALID_API_KEY&ad...
The parameters in the URL seem to be correct encoded.
Has anybody a clue what is going on?
That's strange I'm still getting different results. I tried the Nominatim Server of openstrettmap.org as reference. This service (http://nominatim.openstreetmap.org/search?countrycodes=de&addressdetails...) gives me the same results with curl and directly in the browser, which are not empty.
By the way you shouldn't get an emtpy result in the browser or with curl. There should be something like this:
I can't think of something on my side that is causing trouble especially as I tested this on different machines in different networks.
I found the problem. When I supply the Parameter accept-language=de in the URL I get always the same results.