public static interface MockServerHttpRequest.BodyBuilder extends MockServerHttpRequest.BaseBuilder<MockServerHttpRequest.BodyBuilder>
Modifier and Type | Method and Description |
---|---|
MockServerHttpRequest |
body(org.reactivestreams.Publisher<? extends DataBuffer> body)
Set the body of the request and build it.
|
MockServerHttpRequest |
body(java.lang.String body)
Set the body of the request and build it.
|
MockServerHttpRequest.BodyBuilder |
contentLength(long contentLength)
Set the length of the body in bytes, as specified by the
Content-Length header. |
MockServerHttpRequest.BodyBuilder |
contentType(MediaType contentType)
Set the media type of the body, as specified
by the
Content-Type header. |
accept, acceptCharset, acceptLanguageAsLocales, build, contextPath, cookie, cookies, header, headers, ifModifiedSince, ifNoneMatch, ifUnmodifiedSince, queryParam, queryParams, range, remoteAddress, sslInfo
MockServerHttpRequest.BodyBuilder contentLength(long contentLength)
Content-Length
header.contentLength
- the content lengthHttpHeaders.setContentLength(long)
MockServerHttpRequest.BodyBuilder contentType(MediaType contentType)
Content-Type
header.contentType
- the content typeHttpHeaders.setContentType(MediaType)
MockServerHttpRequest body(org.reactivestreams.Publisher<? extends DataBuffer> body)
body
- the bodyMockServerHttpRequest body(java.lang.String body)
The String is assumed to be UTF-8 encoded unless the request has a "content-type" header with a charset attribute.
body
- the body as text