How to add a given header to an api request example in the postman api document. I am using 'Content-Type': 'application/json' in the headers of postman to test my api requests. However, after generating the postman document from my api collection the curl request example was:
curl --location --request POST 'http://domain/endpoint' \
--data-raw '{"key1": "value1",
"key2": value2}'
I want to add --header 'Content-Type: application/json' to the curl request example in the doc. The request should be:
curl --location --request POST 'http://domain/endpoint' \
--header 'Content-Type: application/json' \
--data-raw '{"key1": "value1",
"key2": value2}'
I found in this link that it is possible: https://www.postman.com/postman/workspace/postman-team-collections/documentation/1372588-81512aa8-f91a-4bcd-a53a-6037780c730e See the picture from the doc: enter image description here
I tried many possible options from pre script to collection general headers without results and it isn't possible to edit the curl request inside the doc after been generated.