FormHttpMessageConverter currently doesn't support reading multipart responses: it can only write requests. Unless I'm mistaken, this means that RestClient can't be used out-of-the-box to make http calls to services which return a multipart response.
Considering that:
- Controller endpoints support reading incoming multiparts (via MultipartResolver)
- Reactive's WebClient can read multiparts
- Spring Integration (HTTP module) has a HttpMessageConverter which can read multiparts (but sadly AFAIK it cannot be used in RestClient because it requires a special instance of HttpInputMessage to work)
I think FormHttpMessageConverter should support reading, or there should be an alternative HttpMessageConverter which can be used for these type of responses
Comment From: polyglot-k
@jhoeller @bclozel Hello, would it be alright if I handled this issue? I’ve reviewed the situation and believe I can resolve it efficiently.
Comment From: bclozel
@polyglot-k let's wait for @rstoyanchev feedback first. He might solve this in https://github.com/spring-projects/spring-framework/issues/35569