Understanding Pre-request Scripts and Tests
Postman offers two key areas where you can implement conditional logic: Pre-request Scripts and Tests. These areas allow you to write JavaScript code to perform actions before sending a request (Pre-request Scripts) and after receiving a response (Tests).
How to handle Conditional Requests/Branching in Postman ?
Conditional requests or branching in Postman allows you to create logic within your requests to handle different scenarios based on conditions. This feature is useful for executing specific actions or tests depending on the response received from an API endpoint.
In this article, we’ll explore how to handle conditional requests or branching in Postman.
Table of Content
- Understanding Pre-request Scripts and Tests
- Characteristics of Pre-request Scripts
- Characteristics of Tests Scripts
- Implementing Conditional Requests in Postman
- Conclusion