最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Spring WebFlux WebClient - 400 Bad Request for Webclient POST call - Stack Overflow

programmeradmin1浏览0评论

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 .springframework.web.reactive.function.client.WebClient;
    
    webClient.post()
                    .uri("url")
                    .contentType(MediaType.APPLICATION_JSON)
                    .bodyValue(payload)
                    .retrieve()
                    .bodyToMono(String.class).block();

'''

发布评论

评论列表(0)

  1. 暂无评论