0

I have a binary file which I presume cannot be sent( using Wininet , POST method , C++ ) as such without encoding as base64. In that case , the encoded data when received in the server side is not being decoded back to binary automatically, even after setting the request header "Content-Transfer-encoding : base64". Can someone enlighten me the proper way of doing?

Note: I tried decoding in the server and it worked. Previous questions in Stackoverflow on the same topic is not answered properly.

1 Answers1

0

You can send binary data with POST requests just fine. The HTTP header specifies the length of the payload, which can be treated as a raw sequence of bytes.

jalf
  • 243,077
  • 51
  • 345
  • 550
  • I just came from here! Same situation. They haven arrived at a solution. – Anantha Subramaniam Aug 16 '12 at 18:05
  • I don't understand what that has to do with anything. POST can be used to send raw binary data. But of course, it requires both the server and client to be able to do so. You haven't said what kind of client and server is being used in your case, so I have no clue how to do it in *your* case. But HTTP POST requests are absolutely capable of doing what you need. :) – jalf Aug 16 '12 at 18:18