Missing Content-Length header sending POST request with WebClient (SpringBoot 2.0.2.RELEASE)
- 阅读更多 关于 Missing Content-Length header sending POST request with WebClient (SpringBoot 2.0.2.RELEASE)
问题 I'm using WebClient (SpringBoot 2.0.2.RELEASE) to send a POST with SOAP request, but it is missing " Content-Length " header required by the legacy API. Is it possible to configure WebClient to include " Content-Length " header? There is an Spring Framework Issue resolved and introduced for EncoderHttpMessageWriter in SpringBoot 2.0.1, but it seems not to work for JAXB. I tried to use BodyInserters : webClient.post().body(BodyInserters.fromObject(request)).exchange(); and syncBody : webClient