From this answer https://stackoverflow.com/a/1695287/256400 , I get the feeling that multipart/form-data is needed to upload file from browser to server. But if
Answering this since I found what I was looking for.
@npcode is correct. I didn't need to specify any encoding and I was able to work directly with Buffer object and I got it working.
I am now using request npm module which takes Buffer objects in body. My confusion arised from the rest client I was using initially which was mojito platforms rest client