We are making a breaking change on August 28, 2020 to how we handle the function body that could impact you if you:
content-type: application/*headers in your POST or PUT requests to Netlify Functions
- Don’t check the function body’s
We currently determine whether to base64 encode the function request body based on whether the content-type header starts with
application/. In both of these cases, we do not encode the body. This means that if you send a binary media type like
application/octet-stream through a Netlify Function, it will be treated as plain text and garbled in the process.
Going forward, we will base64 encode the body if the content-type starts with
application/. This will ensure that binary media types like
application/pdf arrive at their final destinations intact.
Requests with the following content-types will not be base64 encoded, even though they start with
What you can do
- Make sure that your
content-type: application/*headers reflect the encoding you want for your function body
- Make sure your code respects the
Ask us for help!
Please feel free to reach out with questions and we will do our best to answer.