I have to make a call to upload a file to below service:-
@RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
public Response uploadFile(
@RequestParam(value="file", required=true) MultipartFile file,
@RequestParam(value="asOfDate" Date asOfDate,
@RequestHeader(value = "metric") String metric,
@RequestHeader(value = "user_id") String userId,
@RequestHeader(value = "user_name") String userName,
@RequestHeader(value = "user_company_id") String userCompanyId){
}
As of now I am using RestTemplate to make a call to this service, but now I need to convert the RestTemplate calls to Feign Client.
I'm trying to accomplish a multipart file upload using feign, but I can't seem to find a good example of it anywhere.