Skip to content
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

It is not possible to do a @POST with @Multipart with @RetrofitClient and WebClient #49

Open
dante-ricalde opened this issue Jun 13, 2022 · 0 comments

Comments

@dante-ricalde
Copy link

dante-ricalde commented Jun 13, 2022

Describe the bug
Hi guys, @OlgaMaciaszek
I am trying to use @RetrofitClient with WebClient using the retrofit2 @Multipart annotation and it is not possible to do it (it is not working)

I am trying with the following Retrofit Client:

    @Multipart
    @POST("multipart/mono")
    fun multipartMono(@Part("file") file: Mono<org.springframework.http.codec.multipart.Part>): Mono<ResponseEntity<String>>

We want to know if there is a bug to use @Multipart with @RetrofitClient and WebClient or there is not still support for it?
if there is support for it, please can you share the link with the documentation about it?
if there is no support for it, do you have plans to support @Multipart with @RetrofitClient and WebClient?

I did not find spring documentation about how to create a org.springframework.http.codec.multipart.Part from a File, if there is documentation or examples, can you please share it to me?

Currently it is not documented how to use Multipart + Retrofit + WebClient in the official documentation of spring:
https://spring-projects-experimental.github.io/spring-cloud-square/docs/current/reference/html/index.html
https://github.com/spring-projects-experimental/spring-cloud-square
https://spring.io/blog/2021/04/13/introducing-spring-cloud-square

The examples out there are using Multipart + Retrofit + Okhttp:
https://square.github.io/retrofit/
https://futurestud.io/tutorials/retrofit-2-passing-multiple-parts-along-a-file-with-partmap
https://adinugroho.medium.com/upload-image-from-android-app-using-retrofit-2-ae6f922b184c
https://stackoverflow.com/questions/34562950/post-multipart-form-data-using-retrofit-2-0-including-image

I am looking forward to hearing from you!
Best Regards!

If possible, please provide a test case or sample application that reproduces
the problem. This makes it much easier for us to diagnose the problem and to verify that
we have fixed it.

@dante-ricalde dante-ricalde changed the title @POST with @Multipart doesn't work using @RetrofitClient with WebClient It is not possible to do a @POST with @Multipart with @RetrofitClient and WebClient Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant