title: passing JSON object in URL of RESTFUL Web service in Android?
body: <p>I am working with JSON Restful web serivces where I have to pass JSON object in the Service URL. I have created the JSON object successfully but getting exception when my URL created the HTTP connection with the SERVER.</p>
  
  <p>Below I have mention my URL:</p>
  
  <pre><code> http://72.5.167.50:8084/UpdateProfileInfo?{"ProfileEditId":"917","ContactsEmail":[{"Email":"dsfs","ContactId":""}],"ContactsPhone":[{"CountryId":"+1","Type":"2","Phone":"345345"}],"ProfileId":"290","LastName":"demo","GroupId":"1212","Title":"sdf","City":"dsf","TemplateId":"1212","State":"dsf","AuthCode":"9bcc6f63-2050-4c5b-ba44-b8103fbc377a","Address":"sdf","FirstName":"demo","ContactId":"","Zip":"23","Company":"tv"}
  </code></pre>
  
  <p>Getting <code>java.lang.IllegalArgumentException: Illegal character in query</code> in code :</p>
  
  <pre><code>int TIMEOUT_MILLISEC = 100000; // 1000 milisec = 1 seconds
  int SOCKET_TIMEOUT_MILISEC = 120000; // 2 minutes
  HttpParams httpParams = new BasicHttpParams();
  HttpConnectionParams.setConnectionTimeout(httpParams, TIMEOUT_MILLISEC);
  HttpConnectionParams.setSoTimeout(httpParams, SOCKET_TIMEOUT_MILISEC);
  HttpClient client = new DefaultHttpClient(httpParams);
  HttpPost request = new HttpPost(url);
  HttpResponse response = client.execute(request);
  responseString = request(response);
  </code></pre>
  
  <p>Please suggest me If I am doing something wrong with my URL.</p>
  
  <p>*<em>EDITED:</em>*Tried with a key still getting Exeception:</p>
  
  <pre><code>http://72.5.167.50:8084/UpdateProfileInfo?profileinof={"ProfileEditId":"917","ContactsEmail":[{"Email":"sdf","ContactId":""}],"ContactsPhone":[{"CountryId":"+1","Type":"2","Phone":"345345345"}],"ProfileId":"290","LastName":"demo","GroupId":"1212","Title":"dsf","City":"dsf","TemplateId":"1212","State":"dsf","AuthCode":"d968273a-0110-461b-8ecf-3f9c456d17ac","Address":"dsf","FirstName":"demo","ContactId":"","Zip":"23","Company":"tv"}
  </code></pre>