0

I am trying to upload a file with feign client in spring-boot application. I want to set encoder with the following condition:

if (bodyType.equals(MultipartFile.class)){
   // run multi-part logic
} else {
   // Delegate to default encoder.
}

I am not able to delegate the control again on default encoder. Can someone help me to find out the solution. I would be highly appreciated.

Thanks in advance and sorry for my poor english ;)

Cool Java guy מוחמד
  • 1,687
  • 4
  • 24
  • 40

1 Answers1

0

First of all, I have not used Feign before. When i google it, I found an information about feign. Look at here Feign Client (Section 5)

It says : Feign clients can be used to consume text-based HTTP APIs only, which means that they cannot handle binary data, e.g. file uploads or downloads.

Habil
  • 540
  • 1
  • 8
  • 20