I am having an issue with my open feign client uploading documents to a backend API. I have been able to upload a document successfully using Postman, but when I use the exact same settings on my open feign client, the uploaded pdf becomes corrupted and cannot be opened.
@RequestLine("POST /url")
@Headers({
"Content-type: x-www-form-urlencoded",
})
DocumentUpload uploadDocument(@Param("string") String string, @Param("file") File file);
The url, content type, and parameters are all the same in Postman, and as far as I can tell, there are no other settings that I am missing. Has anyone had similar issues or have ideas on what to troubleshoot? Of note, I have tried different content types (eg multipart/form-data) and they fail similarly.