-
Notifications
You must be signed in to change notification settings - Fork 38.5k
WebClient: Multipart POST doesn't work [SPR-15948] #20501
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
Comments
Brian Clozel commented Please update your question with the 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? |
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. |
Sébastien Deleuze commented Could you please update to Spring Framework 5.0.3 and say us if the issue is still present? |
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. |
Rossen Stoyanchev commented We had this #20793 resolved recently which might have been the reason. |
Sébastien Deleuze commented Abhijit Sarkar Any chance you could test with Spring Framework 5.0.4 and send us your feedback? |
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. |
Abhijit Sarkar opened SPR-15948 and commented
Using 5.0.0.BUILD-SNAPSHOT, not RC3.
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 usingWebClient
.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 anOkHttp
client, so I've to believe that it's a bug withWebClient
.By dumping the request body, and comparing it with those from the working versions, I've noticed that
WebClient
adds aContent-Type: text/plain
header for simple form fields likeboard
andnote
above, while the other clients don't. If I remember correctly,WebClient
also adds a;utf-8
after the overallContent-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.Affects: 5.0 RC3
Issue Links:
0 votes, 5 watchers
The text was updated successfully, but these errors were encountered: