title: How to define the base64 content encoding in a REST API?
body: <p>I would like to do a REST resource that could be represented as:</p>
  <ul>
  <li>PDF (binary for download);</li>
  <li>JSON (with structured data);</li>
  <li>PDF (base64 encode)</li>
  </ul>
  <p>My expectation is to create a URL like this:</p>
  <pre><code>http://api.mybank.com/accounts/{accountId}/statement?fromDate=2019-11
  </code></pre>
  <p>The <code>Accept</code> header as <code>'application/json'</code> will return the statement information.</p>
  <p>The <code>Accept</code> header as <code>'application/pdf'</code> will return the statement in a PDF binary file.</p>
  <p>And PDF encoded as <code>base64</code>? How I define this?</p>
  <p><a href="https://www.rfc-editor.org/rfc/rfc2045#page-14" rel="nofollow noreferrer"><strong>Content-Transfer-Encoding</strong></a> is not an HTTP, but email header.</p>
  <p><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding" rel="nofollow noreferrer"><strong>Transfer-Encoding</strong></a> is used only for compression.</p>