Skip to content

FormHttpMessageConverter should be able to read Multipart responses #33263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fpicchi opened this issue Jul 23, 2024 · 0 comments
Open

FormHttpMessageConverter should be able to read Multipart responses #33263

fpicchi opened this issue Jul 23, 2024 · 0 comments
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement

Comments

@fpicchi
Copy link

fpicchi commented Jul 23, 2024

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

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 23, 2024
@bclozel bclozel added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jul 23, 2024
@bclozel bclozel added this to the 6.x Backlog milestone Jul 23, 2024
@jhoeller jhoeller modified the milestones: 6.x Backlog, General Backlog Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants