Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am running newman as a library and has couple of API's in sequence. My requirement is to mofidy "Request Headers" in "beforeRequest" for API-2 based on some data received from API-1. Event? #12810

Open
1 task done
safhusain opened this issue Apr 21, 2024 · 0 comments

Comments

@safhusain
Copy link

Is there an existing issue for this?

  • I have searched the tracker for existing similar issues and I know that duplicates will be closed

Describe the Issue

I am running newman as a library and has couple of API's in sequence. My requirement is to mofidy "Request Headers" in "beforeRequest" for API-2 based on some data received from API-1. Event?

.on('beforeRequest', function (err, args) {
var req = args.request;
args.request.header.push = {"key" : , "value" : }

newMan triggers new API without new Headers on it.
Is it even possible in NewMan?

Steps To Reproduce

newman.run({
collection: require(process.env.collection),
reporters: 'cli',
environment: require(process.env.environment),
folder: process.env.folder,
iterationData: process.env.data

}).on('start', function (err, summary) { // on start of run, log to console
console.log('NewMan --- running a collection...');

}).on('beforeRequest', function (err, args) {
var req = args.request;
args.request.header.push = {"key" : , "value" : }

Screenshots or Videos

No response

Operating System

Windows

Postman Version

10.24

Postman Platform

Both

User Account Type

Signed In User

Additional Context?

This is a problem with NewMan which doesnt allow to change any header (or Body) info in "beforeRequest" event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant