title: Is there a benefit to using binary data for an HTTP POST request?
body: <p>Say I have an HTTP POST method that simple echos the request's body and I cURL it like so:</p>
  
  <pre><code>curl -X POST -d "test non-binary data" "https://endpoint/path/to/resource"
  </code></pre>
  
  <p>As expected, this will result in the following callback:</p>
  
  <pre><code>"test non-binary data"
  </code></pre>
  
  <p>Now let's say I instead pass this data as binary like so:</p>
  
  <pre><code>curl -X POST --data-binary "test binary data" "https://endpoint/path/to/resource"
  </code></pre>
  
  <p>This will give me the following:</p>
  
  <pre><code>"dGVzdCBiaW5hcnkgZGF0YQ=="
  </code></pre>
  
  <p>But I can have my API decode the base64 data and interpret it as ASCII to return the following:</p>
  
  <pre><code>"test binary data"
  </code></pre>
  
  <p>As expected, this is the same as the non-binary request. So, with the results being the same, what exactly is the difference between is passing a binary vs a non-binary request body? Are there any benefits to using binary data? If so, what are some examples when I would want to use binary data instead?</p>