public final class WxApiHttpResponse
extends org.springframework.http.client.AbstractClientHttpResponse
| Constructor and Description |
|---|
WxApiHttpResponse(org.springframework.http.client.ClientHttpResponse delegate,
org.springframework.http.client.ClientHttpRequest request) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
InputStream |
getBody()
装饰一下,返回可以重读的InputStream
|
org.springframework.http.HttpHeaders |
getHeaders()
你问我为什么要偷梁换柱?当然是因为微信接口返回的是JSON,但是Content-Type却是Text_Pain啦,是否要考虑判断内容?
暂时不需要,除非有些接口返回XML,也是这个头,那就坑爹了
|
int |
getRawStatusCode() |
org.springframework.http.HttpStatus |
getStatusCode() |
String |
getStatusText() |
public WxApiHttpResponse(org.springframework.http.client.ClientHttpResponse delegate,
org.springframework.http.client.ClientHttpRequest request)
public org.springframework.http.HttpHeaders getHeaders()
public InputStream getBody() throws IOException
IOExceptionpublic org.springframework.http.HttpStatus getStatusCode()
throws IOException
getStatusCode in interface org.springframework.http.client.ClientHttpResponsegetStatusCode in class org.springframework.http.client.AbstractClientHttpResponseIOExceptionpublic int getRawStatusCode()
throws IOException
IOExceptionpublic String getStatusText() throws IOException
IOExceptionpublic void close()
Copyright © 2018 Guangshan Technology, Inc.. All rights reserved.