I tried to execute an exported postman collection in the newman cli.
Basically they behaviour differently. In the Postman Gui I can fetch an http x-csrf-token. In the I also can see the fetched token.
The same exported collection does not work in newman cli (in my docker container).
If I log the "pm.response.headers" and "pm.request.headers" in postman. I can see the value "Fetched" and the token inside of the response. The same request on newman only shows the http header (not system) with value "fetch". But the response does not contain a value.
Do I have to enable custom http header? I could not found any information about white listing for custom http header in newman environment.
Newman Version (can be found via newman -v): 5.2.2
OS details (type, version, and architecture): Ubuntu 18.04
Are you using Newman as a library, or via the CLI? via CLI in docker container for gitlab ci/cd
Did you encounter this recently, or has this bug always been there: recently
Expected behaviour: same behaviour in newman like in postman
Command / script used to run Newman: newman run "./Postman_Collections/newman_api_collection.json" --verbose --bail --color on -r html,cli -k --delay-request 500 -e "./Postman_Environments/....json" --env-var "ceoUsername=${user}" --env-var "ceoPassword=${pwd}" --env-var "apimApiKey=${apikey}"
Sample collection, and auxiliary files (minus the sensitive details):
Hi,
I tried to execute an exported postman collection in the newman cli. Basically they behaviour differently. In the Postman Gui I can fetch an http x-csrf-token. In the I also can see the fetched token.
The same exported collection does not work in newman cli (in my docker container). If I log the "pm.response.headers" and "pm.request.headers" in postman. I can see the value "Fetched" and the token inside of the response. The same request on newman only shows the http header (not system) with value "fetch". But the response does not contain a value.
Do I have to enable custom http header? I could not found any information about white listing for custom http header in newman environment.
newman -v
): 5.2.2