spring-framework icon indicating copy to clipboard operation
spring-framework copied to clipboard

FormHttpMessageConverter should be able to read Multipart responses

Open fpicchi opened this issue 1 year ago • 0 comments

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

fpicchi avatar Jul 23 '24 10:07 fpicchi