I'm trying to test my logic app API in postman but I'm having an issue with header postman automatically adding
Content-Type = multipart/form-data;
when I hover on the content-type tab seeing this "use the request body tab to control the value or remove the header"
Can anyone help me with how I can set Content-Type = application/json
To do this, open Postman and create a new request by selecting New->Request from the top left: Under Headers, select Key = Content-Type: For Value, select application/json: THANKS FOR READING.
In a POST request, resulting from an HTML form submission, the Content-Type of the request is specified by the enctype attribute on the <form> element.
Go to the body tab, select 'raw' from the sub menu. To the right of 'binary' in the sub menu, a picklist will be available. Select 'Text' (not 'Text[text/plain]') from this list. This will remove the Content-Type header.
You need to set the content-type in postman as JSON (application/json). Go to the body inside your POST request, there you will find the raw option. Right next to it, there will be a drop down, select JSON (application.json).
If you use raw mode for your body data, Postman will set a header based on the type you select (e.g. text, json). If you manually select a Content-Type header, that value will take precedence over what Postman sets.
Postman does not set any header type for the binary body type. By default, Postman will select None —leave it selected if you do not need to send a body with your request.
To do this, open Postman and create a new request by selecting New->Request from the top left: Under Headers, select Key = Content-Type: For Value, select application/json:
Postman won't allow you to edit the headers that it auto-generates based on your drop-down selections, and Content-Type is one of these.
However it will allow you to deselect the auto-generated header and add a custom Content-Type header with any value you want. As far as the actual request is concerned, that's equivalent.
Go to Body -> select raw -> Select JSON from the dropdown. It should look like the image below then set it to application/json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With