Updated deprecated BodyInserters.fromObject method, in favor of BodyInserters.fromValue
This commit is contained in:
parent
ed793f68ec
commit
5b1e597978
|
@ -38,7 +38,7 @@ public class WebClientController {
|
||||||
|
|
||||||
// request header specification
|
// request header specification
|
||||||
WebClient.RequestHeadersSpec<?> requestSpec1 = uri1.body(BodyInserters.fromPublisher(Mono.just("data"), String.class));
|
WebClient.RequestHeadersSpec<?> requestSpec1 = uri1.body(BodyInserters.fromPublisher(Mono.just("data"), String.class));
|
||||||
WebClient.RequestHeadersSpec<?> requestSpec2 = uri2.body(BodyInserters.fromObject("data"));
|
WebClient.RequestHeadersSpec<?> requestSpec2 = uri2.body(BodyInserters.fromValue("data"));
|
||||||
|
|
||||||
// inserters
|
// inserters
|
||||||
BodyInserter<Publisher<String>, ReactiveHttpOutputMessage> inserter1 = BodyInserters
|
BodyInserter<Publisher<String>, ReactiveHttpOutputMessage> inserter1 = BodyInserters
|
||||||
|
@ -49,7 +49,7 @@ public class WebClientController {
|
||||||
map.add("key2", "value2");
|
map.add("key2", "value2");
|
||||||
|
|
||||||
// BodyInserter<MultiValueMap<String, ?>, ClientHttpRequest> inserter2 = BodyInserters.fromMultipartData(map);
|
// BodyInserter<MultiValueMap<String, ?>, ClientHttpRequest> inserter2 = BodyInserters.fromMultipartData(map);
|
||||||
BodyInserter<String, ReactiveHttpOutputMessage> inserter3 = BodyInserters.fromObject("body");
|
BodyInserter<String, ReactiveHttpOutputMessage> inserter3 = BodyInserters.fromValue("body");
|
||||||
|
|
||||||
// responses
|
// responses
|
||||||
WebClient.ResponseSpec response1 = uri1.body(inserter3)
|
WebClient.ResponseSpec response1 = uri1.body(inserter3)
|
||||||
|
|
Loading…
Reference in New Issue