title: Spring RestTemplate upload binary file
body: <p><a href="https://i.stack.imgur.com/Kfemq.png" rel="nofollow noreferrer">Image</a></p>
  <p>I want to write a client code to consume an API.  The API is expecting a text file. When I select the binary file option in the postman tool and select any text file from my local it worked. how to implement this in spring ?. I have tried MULTIPART_FORM_DATA but no luck.</p>