HTTP 406 response

Hi,

Trying to call Nominatim as a web service (from within a Windows program), I get a 406 Not Acceptable response when I submit an HTTP request to this URL:

http://nominatim.openstreetmap.org/search?q=High+Wycombe&format=xml&limit=100&countrycodes=gb&addressdetails=1

I can run the same request in my browser and in Curl. Adding an “email=” parameter doesn’t help.

Any ideas?

Thanks,

Richard

Does your program send a valid user agent string? See http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy

Hi,

I’ve tried doing that (and putting an email address in the URL) - makes no difference.

What would a valid UserAgent value look like? I tried:

stIdHTTP.Request.UserAgent := ‘Modes Complete client. Contact: richard@light.demon.co.uk’;

and that certainly didn’t work.

Thanks,

Richard

I did get a really helpful response to my query, and I can report that the 406 error has now been fixed. It was caused by my putting “Accept: text/xml;” in the header of my HTTP request.

Richard