public class MockClientHttpResponse extends Object implements org.springframework.http.client.reactive.ClientHttpResponse
ClientHttpResponse.| Constructor and Description |
|---|
MockClientHttpResponse(org.springframework.http.HttpStatus status) |
MockClientHttpResponse(int status) |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer> |
getBody() |
reactor.core.publisher.Mono<String> |
getBodyAsString()
Return the response body aggregated and converted to a String using the
charset of the Content-Type response or otherwise as "UTF-8".
|
org.springframework.util.MultiValueMap<String,org.springframework.http.ResponseCookie> |
getCookies() |
org.springframework.http.HttpHeaders |
getHeaders() |
int |
getRawStatusCode() |
org.springframework.http.HttpStatus |
getStatusCode() |
void |
setBody(Publisher<org.springframework.core.io.buffer.DataBuffer> body) |
void |
setBody(String body) |
void |
setBody(String body,
Charset charset) |
String |
toString() |
public MockClientHttpResponse(org.springframework.http.HttpStatus status)
public MockClientHttpResponse(int status)
public org.springframework.http.HttpStatus getStatusCode()
getStatusCode in interface org.springframework.http.client.reactive.ClientHttpResponsepublic int getRawStatusCode()
getRawStatusCode in interface org.springframework.http.client.reactive.ClientHttpResponsepublic org.springframework.http.HttpHeaders getHeaders()
getHeaders in interface org.springframework.http.HttpMessagepublic org.springframework.util.MultiValueMap<String,org.springframework.http.ResponseCookie> getCookies()
getCookies in interface org.springframework.http.client.reactive.ClientHttpResponsepublic void setBody(Publisher<org.springframework.core.io.buffer.DataBuffer> body)
public void setBody(String body)
public reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer> getBody()
getBody in interface org.springframework.http.ReactiveHttpInputMessagepublic reactor.core.publisher.Mono<String> getBodyAsString()