Update reference with examples of multipart requests

Issue: SPR-16118
This commit is contained in:
Rossen Stoyanchev
2017-11-06 16:28:27 -05:00
parent 4ec60f08ad
commit 14f02d7192
9 changed files with 247 additions and 135 deletions

View File

@@ -615,6 +615,17 @@ public interface WebTestClient {
/**
* Set the body of the request to the given synchronous {@code Object} and
* perform the request.
* <p>This method is a convenient shortcut for:
* <pre class="code">
* .body(BodyInserters.fromObject(object))
* </pre>
* <p>The body can be a
* {@link org.springframework.util.MultiValueMap MultiValueMap} to create
* a multipart request. The values in the {@code MultiValueMap} can be
* any Object representing the body of the part, or an
* {@link org.springframework.http.HttpEntity HttpEntity} representing a
* part with body and headers. The {@code MultiValueMap} can be built
* conveniently using
* @param body the {@code Object} to write to the request
* @return a {@code Mono} with the response
*/