Search code examples
httphttpsfile-transfer

Sending data over HTTP/S: binary or encode in base64url?


I know that for example Google's Gmail API wants you to send all the data in base64url due to the fact that different computers with different OS can interpret ASCII etc. differently from your machine.

Therefore, is there any risk of misinterpretation by the receiving server/computer if sending data over HTTP or HTTPS in a binary format rather than encoded base64url?

I used the Google API just as an example, I would like to know more generally if it is safe to send binary over HTTP or HTTPS or if it's better to encode the data in base64url so that no misinterpretation happens on any end of the communication.


Solution

  • There's no reason to encode binary content in HTTP payloads.