{"action":"opened","issue":{"url":"https://api.github.com/repos/square/retrofit/issues/1058","labels_url":"https://api.github.com/repos/square/retrofit/issues/1058/labels{/name}","comments_url":"https://api.github.com/repos/square/retrofit/issues/1058/comments","events_url":"https://api.github.com/repos/square/retrofit/issues/1058/events","html_url":"https://github.com/square/retrofit/issues/1058","id":105052055,"number":1058,"title":"URL Parameter Encoding fails","user":{"login":"jjoe64","id":858379,"avatar_url":"https://avatars.githubusercontent.com/u/858379?v=3","gravatar_id":"","url":"https://api.github.com/users/jjoe64","html_url":"https://github.com/jjoe64","followers_url":"https://api.github.com/users/jjoe64/followers","following_url":"https://api.github.com/users/jjoe64/following{/other_user}","gists_url":"https://api.github.com/users/jjoe64/gists{/gist_id}","starred_url":"https://api.github.com/users/jjoe64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjoe64/subscriptions","organizations_url":"https://api.github.com/users/jjoe64/orgs","repos_url":"https://api.github.com/users/jjoe64/repos","events_url":"https://api.github.com/users/jjoe64/events{/privacy}","received_events_url":"https://api.github.com/users/jjoe64/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-05T21:52:41Z","updated_at":"2015-09-05T21:52:41Z","closed_at":null,"body":"Hi I'm trying to do a simple http get query via `Retrofit`.\r\n\r\nMy parameter has some special characters and it seems that the url encoding fails.\r\n\r\nOriginal:\r\n\r\n    data=[out:json];node[\"name\"~\"Karlsruhe\"][\"place\"~\"city|village|town\"];out body;\r\n\r\ncorrect encoding should look like this:\r\n\r\n    data=%5Bout%3Ajson%5D%3Bnode%5B%22name%22~%22Karlsruhe%22%5D%5B%22place%22~%22city%7Cvillage%7Ctown%22%5D%3Bout%20body%3B\r\n\r\nbut Retrofit creates this:\r\n\r\n    data=[out:json];node[%22name%22~%22Karlsruhe%22][%22place%22~%22city|village|town%22];out%20body;\r\n\r\nand this will fail with:\r\n\r\n> java.lang.IllegalStateException: not valid as a java.net.URI:\r\n> http://overpass.osm.rambler.ru/cgi/interpreter?data=[out:json];node[%22name%22~%22Karlsruhe%22][%22place%22~%22city|village|town%22];out%20body;\r\n> \tat com.squareup.okhttp.HttpUrl.uri(HttpUrl.java:336) \tat\r\n> com.squareup.okhttp.internal.http.RouteSelector.resetNextProxy(RouteSelector.java:135)\r\n> \tat\r\n> com.squareup.okhttp.internal.http.RouteSelector.<init>(RouteSelector.java:71)\r\n> \tat\r\n> com.squareup.okhttp.internal.http.RouteSelector.get(RouteSelector.java:76)\r\n> \tat\r\n> com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:321)\r\n> \tat\r\n> com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:245)\r\n> \tat com.squareup.okhttp.Call.getResponse(Call.java:267) \tat\r\n> com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:224)\r\n> \tat\r\n> com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:195)\r\n> \tat com.squareup.okhttp.Call.execute(Call.java:79) \tat\r\n> retrofit.OkHttpCall.execute(OkHttpCall.java:112)\r\n\r\n\r\nWhat can be done here to fix this encoding issue?\r\nThanks\r\n"}}