Reputation: 11
I am trying to use spring Reactive Webclient to post payload remote microservice. When I post it via postman I am getting response back with { Status: “Success”, statusId:”dff-1244”}. But from via IJ IDE when I debug it is logging 400 BAD Request exception.Sample as follows below
'''
import org.springframework.web.reactive.function.client.WebClient;
webClient.post()
.uri("url")
.contentType(MediaType.APPLICATION_JSON)
.bodyValue(payload)
.retrieve()
.bodyToMono(String.class).block();
'''
Upvotes: 0
Views: 18