首页 新闻 会员 周边 捐助

httpClient 获取response 中的 content 为空的原因(急求)

0
悬赏园豆:5 [待解决问题]

 

 

返回的response : HTTP/1.1 200 OK [Server: Apache-Coyote/1.1, Pragma: No-cache, Cache-Control: no-cache, Expires: Thu, 01 Jan 1970 00:00:00 GMT, Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked, Date: Thu, 07 Jun 2018 03:08:18 GMT] org.apache.http.conn.BasicManagedEntity@56803e05

返回的response中的resEntity : 
{"chunked":true,"content":{},"contentLength":-1,"contentType":{"buffer":{"empty":false,"full":false},"elements":[{"name":"application/json","parameterCount":1,"parameters":[{"name":"charset","value":"UTF-8"}]}],"name":"Content-Type","value":"application/json;charset=UTF-8","valuePos":13},"repeatable":false,"streaming":true}

 

这是请求方法   HttpResponse response = httpClient.execute(httpPost); 

岷州李斌的主页 岷州李斌 | 初学一级 | 园豆:127
提问于:2018-06-07 11:22
< >
分享
所有回答(1)
-1
不会摇头的风扇 | 园豆:443 (菜鸟二级) | 2018-06-07 16:11

   首先非常感谢您的指导、我是在调接口的时候出现的这个问题、在服务端显示、确实有数据的发送、但是在客户端就是接口不到参数、response的content是空的。谢谢

支持(0) 反对(0) 岷州李斌 | 园豆:127 (初学一级) | 2018-06-08 14:49
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册