1

When trying to execute , I am getting following error that is illegal character at 283 .. but I am unable to remove error from 283 index ..thanks for your help

08-11 13:03:32.630: E/AndroidRuntime(16802): Caused by:     java.lang.IllegalArgumentException: Illegal character in query at index 283:     http://locapi.antheminfotech.net/Donor/DonorRegistration?Name=Ashok%20kumar&CityName=Chandigarh&Gender=Male&BloodGroup=O%20+ve&Age=24&EmailAddress=ashok@antheminfotech.com&ContactNumber=9965655555&ImagePath=/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAEEAQADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3
  • Your ImagePath having too long value, is it right ? – Hardik Joshi Aug 11 '14 at 07:44
  • what do you mean to say that if image value is long then i can't store ??? – Harpreet Harry Aug 11 '14 at 07:47
  • and its only the some part of image string i have posted because i am getting error on 283 index – Harpreet Harry Aug 11 '14 at 07:50
  • What you want to do? Are you passing your parameters using GET method, try with POST method at once, and try. – Hardik Joshi Aug 11 '14 at 09:27
  • yes i was able to store data successfully with post method ..but for some reason in api i want to post with get method .. so tell me what to do – Harpreet Harry Aug 11 '14 at 09:30
  • is there any issue if i shall pass with GET method ??? – Harpreet Harry Aug 11 '14 at 09:30
  • Check 283th character (some special) characters within parameter value, I think it causes this error. – Hardik Joshi Aug 11 '14 at 09:33
  • i have checked on 283 i am getting alphabet ... one thing tell me is that any problem if image string is too long with get method ?? – Harpreet Harry Aug 11 '14 at 09:36
  • Hmm, I prefer POST method for such kind of situations. – Hardik Joshi Aug 11 '14 at 09:39
  • ok but tell me one thing more if you can that can i compress string of image ??? – Harpreet Harry Aug 11 '14 at 09:40
  • @HarpreetHarry if you use get for posting data as there is certain limit of characters that it support. even if you send full Base64 String of image. after its limit of characters GET method ignores remaining string. you can have look at this link for more details [link](http://stackoverflow.com/questions/2659952/maximum-length-of-http-get-request) – Yograj Shinde Aug 12 '14 at 04:29
  • @HarpreetHarry if you want to use only GET method my suggestion is you can try to send it same string in chunks. breaking down string in multiple chunks and upload it at server side you need to combine all chunks serially and then process it as per requirement. – Yograj Shinde Aug 12 '14 at 04:33

0 Answers0