Why not ask your question on the new OpenStreetMap Community Forum?

Hi, I am calling a nominatim WS through a Java client using this piece of code:

String urls = "http://nominatim.openstreetmap.org/search?q= " + URLEncoder.encode(addressString.trim(), "UTF-8") + "&format=json&polygon=1&addressdetails=1";
URL url = new URL(urls);            
HttpURLConnection uc = (HttpURLConnection) url.openConnection();            
uc.setRequestProperty("Accept-Charset:", "UTF-8");

But i got this error:

'406: Not Acceptable' for url: 'http://nominatim.openstreetmap.org/search?q= %CE%A0%CE%91%CE%A1%CE%99%CE%A3%CE%99&format=json&polygon=1&addressdetails=1'

Thanks and best Regards,

asked 05 Aug '15, 09:49

ricard_3's gravatar image

accept rate: 0%

edited 05 Aug '15, 10:36

scai's gravatar image

scai ♦

removing the white space after q "q= " has solved the problem. Thanks

permanent link

answered 05 Aug '15, 10:37

ricard_3's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 05 Aug '15, 09:49

question was seen: 4,900 times

last updated: 05 Aug '15, 10:37

powered by OSQA