04-30 18:33:23.036: E/AndroidRuntime(22231): java.lang.IllegalArgumentException: Illegal character in query at index 54: http://www.slicapp.com/slic/edit_profile.php?message=[{&email1=prabhjotkaur3@hotmail.com&email2=bgf&email3=hg&facebook=ggf&twitter=&gplus=&youtube=&linkedin=&instagram=&tumblr=ggf&udid1251935507&fbuid1251935507&fbid& fbpw}]
04-30 18:33:23.036: E/AndroidRuntime(22231): at java.net.URI.create(URI.java:970)
04-30 18:33:23.036: E/AndroidRuntime(22231): at org.apache.http.client.methods.HttpPost.<init>(HttpPost.java:79)
Asked
Active
Viewed 301 times
1
-
And what's the code you're using? – thegrinner Apr 30 '13 at 13:09
-
Just check if your `URL` is valid one ! I see a space between `&` and `fbpw` ! – AllTooSir Apr 30 '13 at 13:10
1 Answers
2
You have a space in your query between the amp &
abd fbpw
..
http://www.slicapp.com/slic/edit_profile.php?message=[{&email1=prabhjotkaur3@hotmail.com&email2=bgf&email3=hg&facebook=ggf&twitter=&gplus=&youtube=&linkedin=&instagram=&tumblr=ggf&udid1251935507&fbuid1251935507&fbid& fbpw}]
^
Also, note as in this answer, the brackets [
and ]
may need to be percent escaped (the first one you have is the index complained about). Quoted:
The '[' and ']' characters are characters and should be percent escaped if not used as delimiters in the scheme-specific syntax. The spec says:
"URI producing applications should percent-encode data octets that correspond to characters in the reserved set unless these characters are specifically allowed by the URI scheme to represent data in that component."

Community
- 1
- 1

thegrinner
- 11,546
- 5
- 41
- 64
-
I am not getting from this link how to decode [,{ if i removing these bracket no error is coming so please suggest me how to encode [,{,}] – user Apr 30 '13 at 13:57
-
Take a look here: http://stackoverflow.com/questions/3286067/url-encoding-in-android – thegrinner Apr 30 '13 at 13:59
-
By checking this webservice can u please tell me is this is HttpGet or Post i am using HTTP Post method can u please check this? – user Apr 30 '13 at 14:19