public class XClientHttpResponse extends Object implements org.springframework.http.client.ClientHttpResponse
ClientHttpResponse| Constructor and Description |
|---|
XClientHttpResponse() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
InputStream |
getBody() |
String |
getBodyAsString()
HttpInputMessage.getBody() as string |
String |
getBodyAsString(Charset charset)
HttpInputMessage.getBody() as string |
org.springframework.http.HttpHeaders |
getHeaders() |
String |
getHttpVersion()
Get HTTP version
|
int |
getRawStatusCode() |
org.springframework.http.HttpStatus |
getStatusCode() |
String |
getStatusLine()
Get status line
|
String |
getStatusText() |
public String getStatusLine() throws IOException
IOException - if failed to getpublic String getHttpVersion() throws IOException
IOException - if failed to getpublic org.springframework.http.HttpStatus getStatusCode()
throws IOException
getStatusCode in interface org.springframework.http.client.ClientHttpResponseIOExceptionpublic int getRawStatusCode()
throws IOException
getRawStatusCode in interface org.springframework.http.client.ClientHttpResponseIOExceptionpublic String getStatusText() throws IOException
getStatusText in interface org.springframework.http.client.ClientHttpResponseIOExceptionpublic org.springframework.http.HttpHeaders getHeaders()
getHeaders in interface org.springframework.http.HttpMessagepublic InputStream getBody() throws IOException
getBody in interface org.springframework.http.HttpInputMessageIOExceptionpublic String getBodyAsString() throws IOException
HttpInputMessage.getBody() as stringIOException - if failed to getpublic String getBodyAsString(Charset charset) throws IOException
HttpInputMessage.getBody() as stringcharset - CharsetIOException - if failed to getpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface org.springframework.http.client.ClientHttpResponseCopyright © 2017–2018 SPT. All rights reserved.