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(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> body) |
void |
setBody(String body) |
void |
setBody(String body,
Charset charset) |
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.ClientHttpResponse
public int getRawStatusCode()
getRawStatusCode
in interface org.springframework.http.client.reactive.ClientHttpResponse
public org.springframework.http.HttpHeaders getHeaders()
getHeaders
in interface org.springframework.http.HttpMessage
public org.springframework.util.MultiValueMap<String,org.springframework.http.ResponseCookie> getCookies()
getCookies
in interface org.springframework.http.client.reactive.ClientHttpResponse
public void setBody(org.reactivestreams.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.ReactiveHttpInputMessage
public reactor.core.publisher.Mono<String> getBodyAsString()