public class MockClientHttpResponse extends Object implements org.springframework.http.client.ClientHttpResponse
ClientHttpResponse.| Constructor and Description |
|---|
MockClientHttpResponse(InputStream bodyStream,
org.springframework.http.HttpHeaders headers,
org.springframework.http.HttpStatus statusCode,
String statusText) |
MockClientHttpResponse(String body,
org.springframework.http.HttpHeaders headers,
org.springframework.http.HttpStatus statusCode,
String statusText) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
InputStream |
getBody() |
org.springframework.http.HttpHeaders |
getHeaders() |
int |
getRawStatusCode() |
org.springframework.http.HttpStatus |
getStatusCode() |
String |
getStatusText() |
public MockClientHttpResponse(String body, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus statusCode, String statusText)
public MockClientHttpResponse(InputStream bodyStream, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus statusCode, String statusText)
public InputStream getBody() throws IOException
getBody in interface org.springframework.http.HttpInputMessageIOExceptionpublic org.springframework.http.HttpHeaders getHeaders()
getHeaders in interface org.springframework.http.HttpMessagepublic int getRawStatusCode()
throws IOException
getRawStatusCode in interface org.springframework.http.client.ClientHttpResponseIOExceptionpublic org.springframework.http.HttpStatus getStatusCode()
throws IOException
getStatusCode in interface org.springframework.http.client.ClientHttpResponseIOExceptionpublic String getStatusText() throws IOException
getStatusText in interface org.springframework.http.client.ClientHttpResponseIOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface org.springframework.http.client.ClientHttpResponseCopyright © 2016. All rights reserved.