@POST with @Body doesn't work using @RetrofitClient with WebClient
See original GitHub issueDescribe the bug Please provide details of the problem, including the version of Spring Cloud that you are using.
Hi guys, @OlgaMaciaszek I am trying to use @RetrofitClient with WebClient using the @Body annotation for the body, but it is not working.
I am trying with the following Retrofit Client:
@RetrofitClient(name = "HelloServer", url = "http://localhost:7111", configuration = HelloClientConfiguration.class)
public interface HelloClient {
@GET("/")
Mono<String> hello();
@Headers({"Content-Type: application/json"})
@POST("/card")
Mono<Card> create(@Body Card card);
}
I have the following questions:
I would like to know if you have implemented the CallAdapterFactory or ConverterFactory so that the @Body works serializing the object to be set as the request body? We are using the version 0.4.0-M1 of spring-cloud-square-retrofit and the serializing of the Body is not working.
We would like to know if you know about this and how We can do to solve this problem: maybe adding a specific configuration or waiting for the next version of spring-cloud-square?
I am looking forward to hearing from you! Important: If you need help regarding to this issue, please let me know how I can help you.
Best Regards!
Sample 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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
The bug is there. Will fix it.
Thanks, will take a look at this.