How does spring cloud use feign to construct multi parameter requests
In this section, we discuss how to use feign to construct multi parameter requests. The author takes the requests of get and post methods as examples to explain. The request principles of other methods (such as delete, put, etc.) are the same, and readers can study them by themselves.
Get request multi parameter URL
Suppose that the URL we request contains multiple parameters, such as http://microservice-provider-user/get?id=1&username= Zhang San, how to construct it?
(1) I hope feign can support the issue of POJO for parameter requests: https://github.com/spring-cloud/spring-cloud-netflix/issues/1253 (2) It is recommended to use feign's native annotation issue: https://github.com/spring-cloud/spring-cloud-netflix/issues/659 (3) It is recommended to enhance feign's functions: https://github.com/spring-cloud/spring-cloud-netflix/issues/1360 (4) It is recommended to support the optional request body (at present, feign will report an exception when post is null): https://github.com/spring-cloud/spring-cloud-netflix/issues/1047