public final class MockServerWebExchange extends DefaultServerWebExchange
DefaultServerWebExchange
for use in tests with
MockServerHttpRequest
and MockServerHttpResponse
.
See static factory methods to create an instance.
ServerWebExchange.Builder
Modifier | Constructor and Description |
---|---|
private |
MockServerWebExchange(MockServerHttpRequest request) |
Modifier and Type | Method and Description |
---|---|
static MockServerWebExchange |
from(MockServerHttpRequest.BaseBuilder<?> requestBuilder)
A variant of
from(MockServerHttpRequest) that accepts a request
builder. |
static MockServerWebExchange |
from(MockServerHttpRequest request)
Create a
MockServerWebExchange from the given request. |
MockServerHttpResponse |
getResponse()
Return the current HTTP response.
|
addUrlTransformer, checkNotModified, checkNotModified, checkNotModified, getAttributes, getFormData, getLocaleContext, getMultipartData, getPrincipal, getRequest, getSession, isNotModified, transformUrl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttribute, getAttributeOrDefault, getRequiredAttribute, mutate
private MockServerWebExchange(MockServerHttpRequest request)
public MockServerHttpResponse getResponse()
ServerWebExchange
getResponse
in interface ServerWebExchange
getResponse
in class DefaultServerWebExchange
public static MockServerWebExchange from(MockServerHttpRequest request)
MockServerWebExchange
from the given request.request
- the request to use.public static MockServerWebExchange from(MockServerHttpRequest.BaseBuilder<?> requestBuilder)
from(MockServerHttpRequest)
that accepts a request
builder. Internally invokes the build()
to build the request.requestBuilder
- the builder for the request.