You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can improve the logic to first make a decision if the request is multipart by checking the content-type and the presence of MultipartBodyBuilder, and if it is then prepare it as such.
When it comes to @RequestParam, the term request parameter comes from the Servlet API, and could mean a parameter from the query of the URI, from the body of a form data request, or from the parts of a multipart request. When handling a request it's possible to check all places, but when preparing a request it's less clear what it should be.
For a multipart request at least, we can expect use of @RequestPart if it needs to be in the body, but otherwise @RequestParam becomes a query parameter. For a form data request however, @RequestParam would have to remain as is, i.e. always in the body as there is no way to differentiate one from the other.
rstoyanchev
changed the title
WebClient HTTP Interface cannot send uri parameter and body at the same time
HTTP Interface client cannot send URI query parameter with multipart request
May 24, 2023
Problem:
I have an interface that needs to pass a file and a uri parameter, I use WebClient HTTP Interface , like this:
call this method,the server can not receive the file 。
in the code : org.springframework.web.service.invoker.HttpRequestValues.Builder#build
if the request have requestParams, the multipartBuilder won't handle it.
The text was updated successfully, but these errors were encountered: