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.HttpInputMessage
IOException
public org.springframework.http.HttpHeaders getHeaders()
getHeaders
in interface org.springframework.http.HttpMessage
public int getRawStatusCode() throws IOException
getRawStatusCode
in interface org.springframework.http.client.ClientHttpResponse
IOException
public org.springframework.http.HttpStatus getStatusCode() throws IOException
getStatusCode
in interface org.springframework.http.client.ClientHttpResponse
IOException
public String getStatusText() throws IOException
getStatusText
in interface org.springframework.http.client.ClientHttpResponse
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.springframework.http.client.ClientHttpResponse
Copyright © 2016. All rights reserved.