Adding charset into content-type=application/octet-stream

I need to send a POST request with binary data with content-type=application/octet-stream. I added the header manually, however Postman adds encoding into the header, so my application receives a request with content-type=application/octet-stream;charset=UTF-8.

How do I prevent adding the charset into the content-type?
I’m using Postman desktop app v10.19.7.

Hi @PhilMacGregor !

Great question, here’s how you can work around this:

  1. Disable Automatic Headers: Postman has a setting that automatically sends certain headers with requests. To ensure that you have complete control over the headers being sent:
    • Open the Postman app.
    • Navigate to the settings (usually represented by a gear icon on the top right corner).
    • Under the “General” tab, find the setting for “Header auto-add”.
    • Make sure the option for automatically adding headers is turned off.
  2. Manual Headers: After ensuring the above, manually add your desired headers to your request without the charset. Specifically, you’d add Content-Type: application/octet-stream.
  3. Check Pre-request Script: Ensure that there are no pre-request scripts in the collection or request level that might be modifying headers.
  4. Update: Though you’re using a relatively recent version of Postman (v10.19.7), always consider checking for updates. Occasionally, certain behaviors might be affected by bugs that are fixed in newer versions.

If you’ve done the above and you’re still facing the issue, it might be a more specific issue with your setup or a potential bug. In that case, please provide more details about your setup and the exact steps you’re taking, and we can further investigate.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.