I agree with what @praveendvd said. What you could possible do is create a set of environment variables for which types of requests you want to run.
In your pre-request script (you could even do this at the collection level so you didnβt have to repeat it for every request) you can use the following script:
if(pm.request.method === 'GET' && !pm.environment.get('executeGETRequests') {
pm.request.url = 'https://www.postman-echo.com/delay/0';
}
else if(pm.request.method === 'PUT' && !pm.environment.get('executePUTRequests') {
pm.request.url = 'https://www.postman-echo.com/delay/0';
pm.request.method = 'GET';
}
else if(pm.request.method === 'POST' && !pm.environment.get('executePOSTRequests') {
pm.request.url = 'https://www.postman-echo.com/delay/0';
pm.request.method = 'GET';
}
else if(pm.request.method === 'DELETE' && !pm.environment.get('executeDELETERequests') {
pm.request.url = 'https://www.postman-echo.com/delay/0';
pm.request.method = 'GET';
}
This script will check if the request is a specific HTTP method, check your environment variable to see if it should execute, and if itβs not allowed, change the request to hit the postman echo API - which is essentially a no-op. It does not permanently change your request, just that specific execution.