public class MockClientHttpResponse
extends java.lang.Object
implements org.springframework.http.client.reactive.ClientHttpResponse
ClientHttpResponse.| Constructor and Description |
|---|
MockClientHttpResponse(org.springframework.http.HttpStatus status) |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer> |
getBody() |
reactor.core.publisher.Mono<java.lang.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<java.lang.String,org.springframework.http.ResponseCookie> |
getCookies() |
org.springframework.http.HttpHeaders |
getHeaders() |
int |
getRawStatusCode() |
org.springframework.http.HttpStatus |
getStatusCode() |
void |
setBody(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> body) |
void |
setBody(java.lang.String body) |
void |
setBody(java.lang.String body,
java.nio.charset.Charset charset) |
public MockClientHttpResponse(org.springframework.http.HttpStatus 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<java.lang.String,org.springframework.http.ResponseCookie> getCookies()
getCookies in interface org.springframework.http.client.reactive.ClientHttpResponsepublic void setBody(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> body)
public void setBody(java.lang.String body)
public void setBody(java.lang.String body,
java.nio.charset.Charset charset)
public reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer> getBody()
getBody in interface org.springframework.http.ReactiveHttpInputMessagepublic reactor.core.publisher.Mono<java.lang.String> getBodyAsString()