Hello,
I've been using httpclient v4.1 in my application. But so far I've searched for
the whole week and couldn't find how to set encoding to UTF8 for all my post
requests. I mean, we have got really a few documents there.
Following is the code I've used to send a http post.
DefaultHttpClient httpclient = new
DefaultHttpClient();
HttpPost httppost = new
HttpPost(address);
try {
httpclient.setCookieStore(Forum_app.store);
List<NameValuePair>
nameValuePairs = new ArrayList<NameValuePair>(5);
.
.
httppost.setEntity(new
UrlEncodedFormEntity(nameValuePairs));
HttpResponse responseforurl =
httpclient.execute(httppost);
}
Can anyone please show me how?
Thanks in advance.
Cheers,
Yanchuan Li
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]