Skip to content

Pre request scripts for all requests in collection and workspace #117

@jakob-lj

Description

@jakob-lj

Thank you for an excellent tool!

We're utilizing the pre-request script feature in our Postman collection to run the same script for all requests within the collection.

Since many of our requests share the same authentication mechanism, it’s essential to refresh tokens as needed without duplicating code in each request. By applying the DRY principle, we've streamlined this process in Postman. The pre-request script updates variables, which are then used for authentication across the collection.

The requests inherit the authentication and variables from the collection, making the implementation both efficient and maintainable.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions