标签:data odi str oct har 内容 xhtml app tpc
1、httpPost 设置header,header内容是在发送请求的头文件里面HttpPost httpPost = new HttpPost(url);
如:
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
StringEntity stringEntity = new StringEntity(data, ToolString.encoding);
如:
<!DOCTYPE html>
<html id="spLianghui">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
HttpResponse response = httpClient.execute(httpPost);
标签:data odi str oct har 内容 xhtml app tpc
原文地址:http://blog.51cto.com/1197822/2157329