com.foxinmy.weixin4j.http.weixin
Class WeixinResponse

java.lang.Object
  extended by 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
WeixinResponse(HttpResponse response)
           
 
Method Summary
 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()
          响应状态
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface HttpMessage
Returns:

getStatus

public HttpStatus getStatus()
Description copied from interface: HttpResponse
响应状态

Specified by:
getStatus in interface HttpResponse
Returns:

getContent

public byte[] getContent()
Description copied from interface: HttpResponse
响应内容

Specified by:
getContent in interface HttpResponse
Returns:

getBody

public InputStream getBody()
Description copied from interface: HttpResponse
响应内容

Specified by:
getBody in interface HttpResponse
Returns:

getProtocol

public HttpVersion getProtocol()
Description copied from interface: HttpResponse
HTTP协议

Specified by:
getProtocol in interface HttpResponse
Returns:

close

public void close()
Description copied from interface: HttpResponse
释放资源

Specified by:
close in interface HttpResponse


Copyright © 2014–2017. All rights reserved.