前提:Post形式传递参数。
问题:HttpClient Post形式传递参数乱码
解决方式:扩展PostMethod
public class UTF8PostMethod extends PostMethod{
public UTF8PostMethod(String url){
super(url);
}
@Override
public String getRequestCharSet() {
return "UTF-8";
}
}
问题:HttpClient Post形式传递参数乱码
解决方式:扩展PostMethod
public class UTF8PostMethod extends PostMethod{
public UTF8PostMethod(String url){
super(url);
}
@Override
public String getRequestCharSet() {
return "UTF-8";
}
}