“I have functions defined under pre-request in a collection, and these functions are contained within an object. In the new collection that I create, I don’t want to constantly copy/paste the same functions. Can I designate one collection as a base and call these functions within the object in the new collections?”
Hey @acihad
I’ve added a Collection to the Postman Answers Public Workspace that demonstrates a very basic way to store the functions at the Global level.
These can then be used in any of the Workspaces Collections, after calling the utils
variable using:
eval(pm.globals.get("utils"));
In the example, I’ve used this at the request level but you should be able to place this statement at the Collection and not have to repeat it with each request.