I post a file using form-data but file is uploading corrupted. I need to post it as binary. How can I do it in Java using HttpClient?
"Content-Type": "application/octet-stream"
We can set it like below:
post.setEntity(new FileEntity(file));