Reputation: 1599
Is it possible to post form data with NetFlix' Feign library?
@RequestLine("POST /progs/dorules/{vsid}/add/{rsid}")
@Body("%7B\"ADD\": \"add\", \"rule\": \"{rule}\"%7D")
void addRule(
@Param("rule") String name,
@Param("vsid") String vsid,
@Param("rsid") String rsid
);
I want the call to look as follows:
POST https://xxxx/progs/dorules/1/add/80
With Parameters: ADD = Add rule = default
With form type : application/x-www-form-urlencoded
Upvotes: 2
Views: 11306
Reputation: 751
Feign Form adds support for encoding application/x-www-form-urlencoded and multipart/form-data forms.
https://github.com/OpenFeign/feign-form
If you are calling a Spring MVC application, it's best to use the SpringFormEncoder
Upvotes: 0