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 voidclose()释放资源com.alibaba.fastjson.JSONObjectgetAsJson()<T> TgetAsObject(com.alibaba.fastjson.TypeReference<T> typeReference)ApiResultgetAsResult()StringgetAsString()XmlResultgetAsXml()InputStreamgetBody()响应内容byte[]getContent()响应内容HttpHeadersgetHeaders()HTTP报头HttpVersiongetProtocol()HTTP协议HttpStatusgetStatus()响应状态
-
-
-
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:HttpMessageHTTP报头- Specified by:
getHeadersin interfaceHttpMessage- Returns:
-
getStatus
public HttpStatus getStatus()
Description copied from interface:HttpResponse响应状态- Specified by:
getStatusin interfaceHttpResponse- Returns:
-
getContent
public byte[] getContent()
Description copied from interface:HttpResponse响应内容- Specified by:
getContentin interfaceHttpResponse- Returns:
-
getBody
public InputStream getBody()
Description copied from interface:HttpResponse响应内容- Specified by:
getBodyin interfaceHttpResponse- Returns:
-
getProtocol
public HttpVersion getProtocol()
Description copied from interface:HttpResponseHTTP协议- Specified by:
getProtocolin interfaceHttpResponse- Returns:
-
close
public void close()
Description copied from interface:HttpResponse释放资源- Specified by:
closein interfaceHttpResponse
-
-