From e6ab521b6127a9949515da3ad47aac66e8963cf9 Mon Sep 17 00:00:00 2001 From: Gerardo Roza Date: Thu, 21 Jan 2021 14:57:06 -0300 Subject: [PATCH] added LinkedMultiValueMap usage for inserter declaration, as in article --- .../com/baeldung/web/reactive/client/WebClientController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-5-reactive/src/main/java/com/baeldung/web/reactive/client/WebClientController.java b/spring-5-reactive/src/main/java/com/baeldung/web/reactive/client/WebClientController.java index 66f787eda3..34de13bc28 100644 --- a/spring-5-reactive/src/main/java/com/baeldung/web/reactive/client/WebClientController.java +++ b/spring-5-reactive/src/main/java/com/baeldung/web/reactive/client/WebClientController.java @@ -13,8 +13,10 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ReactiveHttpOutputMessage; +import org.springframework.http.client.reactive.ClientHttpRequest; import org.springframework.http.client.reactive.ReactorClientHttpConnector; import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; @@ -58,7 +60,7 @@ public class WebClientController { map.add("key1", "value1"); map.add("key2", "value2"); - // BodyInserter, ClientHttpRequest> inserter2 = BodyInserters.fromMultipartData(map); + BodyInserter, ClientHttpRequest> inserter2 = BodyInserters.fromMultipartData(map); BodyInserter inserter3 = BodyInserters.fromValue("body"); // responses