Package com.foxinmy.weixin4j.http.weixin
Class WeixinResponse
- java.lang.Object
-
- com.foxinmy.weixin4j.http.weixin.WeixinResponse
-
- All Implemented Interfaces:
HttpMessage
,HttpResponse
public class WeixinResponse extends Object implements HttpResponse
调用微信接口响应- Since:
- JDK 1.6
- Author:
- jinyu
-
-
Constructor Summary
Constructors Constructor Description WeixinResponse(HttpResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
释放资源com.alibaba.fastjson.JSONObject
getAsJson()
<T> T
getAsObject(com.alibaba.fastjson.TypeReference<T> typeReference)
ApiResult
getAsResult()
String
getAsString()
XmlResult
getAsXml()
InputStream
getBody()
响应内容byte[]
getContent()
响应内容HttpHeaders
getHeaders()
HTTP报头HttpVersion
getProtocol()
HTTP协议HttpStatus
getStatus()
响应状态
-
-
-
Constructor Detail
-
WeixinResponse
public WeixinResponse(HttpResponse response)
-
-
Method Detail
-
getAsString
public String getAsString()
-
getAsResult
public ApiResult getAsResult()
-
getAsJson
public com.alibaba.fastjson.JSONObject getAsJson()
-
getAsXml
public XmlResult getAsXml()
-
getAsObject
public <T> T getAsObject(com.alibaba.fastjson.TypeReference<T> typeReference)
-
getHeaders
public HttpHeaders getHeaders()
Description copied from interface:HttpMessage
HTTP报头- Specified by:
getHeaders
in interfaceHttpMessage
- Returns:
-
getStatus
public HttpStatus getStatus()
Description copied from interface:HttpResponse
响应状态- Specified by:
getStatus
in interfaceHttpResponse
- Returns:
-
getContent
public byte[] getContent()
Description copied from interface:HttpResponse
响应内容- Specified by:
getContent
in interfaceHttpResponse
- Returns:
-
getBody
public InputStream getBody()
Description copied from interface:HttpResponse
响应内容- Specified by:
getBody
in interfaceHttpResponse
- Returns:
-
getProtocol
public HttpVersion getProtocol()
Description copied from interface:HttpResponse
HTTP协议- Specified by:
getProtocol
in interfaceHttpResponse
- Returns:
-
close
public void close()
Description copied from interface:HttpResponse
释放资源- Specified by:
close
in interfaceHttpResponse
-
-