Command / script used to run Newman: =
newman run ".\dirname\dirname\PostmanFiles\Proj.postman_collection.json" --environment ".\dirname\dirname\PostmanFiles\Proj%%20localhost.postman_environment.json" --folder apiFunctions
Sample collection, and auxilliary files (minus the sensitive details): = none relevant
Steps to reproduce the problem:
@codenirvana Is there anything stopping this?
For the library API, we can directly support https://github.com/salesforce/tough-cookie CookieJar or through postman-request if the option of changing the base library is required sometime in the future.
For the CLI a json file can be used, tough-cookie has fromJSON/toJSON methods (https://github.com/salesforce/tough-cookie#cookiejarfromjsonstring).
If this looks okay then I can open a PR for the same.
@rohit-gohri Yes, the underlying postman-runtime library accepts a tough-cookie jar instance.
Refer: https://github.com/postmanlabs/newman/blob/develop/lib/run/index.js#L176
Please feel free to raise PR for this feature request. 馃檪
@codenirvana Could you take a look at the PR? It would be really great if it got merged before the next release.
@codenirvana Sorry for pinging again, but this would be really helpful for my use-case. If you could have a look, it'd be great
Hey @rohit-gohri, sorry for getting back to you so late. I will definitely review this PR today.
Newman v5.2.0 adds support for providing custom Cookie Jar using the new --cookie-jar option.
Thanks @rohit-gohri for your contribution! 馃檶