之前用org.apache.http.client.* 包的HttpClient 发送过去参数 用UrlEncoderFormEntity 发送过去都是URLencoder后的 对方获取后 未能还原成中文
最后还是是了comm http
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.PostMethod;
HttpClient httpClient = new HttpClient();
PostMethod post = new PostMethod(url);NameValuePair[] data = new NameValuePair[]{new NameValuePair("content",content),
new NameValuePair("timestamp",time),new NameValuePair("mcode",mcode),
new NameValuePair("sign",sign)};
post.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
post.setQueryString(data);
post.setFollowRedirects(false);
httpClient.executeMethod(post);
result = post.getResponseBodyAsString();