im trying to send a mail request to webservice .. when i add the special @ character in the parameter, it closes until% 40.i checked the server side. They get% 40 instead of @. Can someone help me ?? here is my code ..
httpclient = new DefaultHttpClient(); List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); nameValuePairs.add(new BasicNameValuePair("Email", " abc@gmail.com ")); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); ResponseHandler<String> responseHandler = new BasicResponseHandler(); String response = httpclient.execute(httppost,responseHandler);
I also tried this method to prevent my parameter from coding.
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs, HTTP.PLAIN_TEXT_TYPE));
but he picked up an unsupported encoded algorithm
Pls help me with this.
source share