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
{{ message }}
Repository navigation
WebClient: Multipart POST doesn't work [SPR-15948] #20501
I understand that #19114 added multipart support for WebClient, and I also looked at the integration tests, but sadly, it doesn't work for the following request made using WebClient.
I keep getting the error "400 board is required" from the server. I'm not saying Pinterest API is the best designed in the world, actually it's quite the contrary, but the above curl statement works, and so does an OkHttp client, so I've to believe that it's a bug with WebClient.
By dumping the request body, and comparing it with those from the working versions, I've noticed that WebClient adds a Content-Type: text/plain header for simple form fields like board and note above, while the other clients don't. If I remember correctly, WebClient also adds a ;utf-8 after the overall Content-Type boundary, which the other clients don't. There may be other differences that I'm failing to report now, since it was done in a caffeine-fuelled, late-night, debugging session. Also see #20500 which is adding to the differences.
Please update your question with the WebClient code you're using, or better, a repro project.
Even if it is useful, we can't work from your own interpretation of the issue, but rather the issue itself: what were you trying to do? what did you try to achieve that? what did happen? what did you expect to happen instead?
Activity
spring-projects-issues commentedon Sep 11, 2017
Brian Clozel commented
Please update your question with the
WebClientcode you're using, or better, a repro project.Even if it is useful, we can't work from your own interpretation of the issue, but rather the issue itself: what were you trying to do? what did you try to achieve that? what did happen? what did you expect to happen instead?
spring-projects-issues commentedon Dec 12, 2017
Abhijit Sarkar commented
Looks like I somehow missed the notification, or it was never sent out, of a follow up comment. The code that's not working is here https://github.com/asarkar/spring/blob/master/pinterest-client/src/main/kotlin/org/abhijitsarkar/spring/pinterest/client/Pinterest.kt#L257. I had to use OkHttp instead because of this bug.
spring-projects-issues commentedon Jan 26, 2018
Sébastien Deleuze commented
Could you please update to Spring Framework 5.0.3 and say us if the issue is still present?
spring-projects-issues commentedon Jan 27, 2018
Abhijit Sarkar commented
This was several months ago, and I'll have to try to reproduce this error. If and when I am able to, I'll post an update.
spring-projects-issues commentedon Jan 27, 2018
Rossen Stoyanchev commented
We had this #20793 resolved recently which might have been the reason.
spring-projects-issues commentedon Mar 26, 2018
Sébastien Deleuze commented
Abhijit Sarkar Any chance you could test with Spring Framework 5.0.4 and send us your feedback?
spring-projects-issues commentedon Mar 28, 2018
Abhijit Sarkar commented
After 6 months, I no longer remember the context, and also don't have the original code. Feel free to close the issue.