FeignClient 411 content-length

2.3k views Asked by At

I use feign client to get an object from my provider with an object query: doGet(User u); Then an exception occurs: feign.FeignException$FeignClientException: [411 Length Required] during [GET] to ...

This exception does not always happen, sometimes it works well. Why does this error occur?

1

There are 1 answers

0
Shavkat Turakulov On

add to header of the request if you send empty body:

Content-Length:0

and send empty object json:

{}

in body of the request