reqDelay
Set the request delay time (in milliseconds).
Rule Syntax
txt
pattern reqDelay://value [filters...]| Parameters | Description | Detailed Documentation |
|---|---|---|
| pattern | Expression to match request URLs | Match Pattern Documentation |
| value | Time value (in milliseconds) ⚠️ Loading data from files/remote URLs is not supported | Operation Instruction Documentation |
| filters | Optional filters, supporting matching: • Request URL/Method/Headers/Content • Response Status Code/Headers | Filter Documentation |
Configuration Example
txt
# Delay 3000 milliseconds (i.e., 3 seconds) for requests
www.example.com/path reqDelay://3000
# Abort after 5000 seconds (i.e., 5 seconds) Request
www.example.com/path2 reqDelay://5000 enable://abortRandom Delay
You can use reqScript to implement a random delay request:
txt
# Randomly set reqDelay://1000 to reqDelay://6000 milliseconds
``` delay.js
rules.push(`* reqDelay://${1000 + Math.ceil(5000 * Math.random())}`);
```
www.example.com/path reqScript://{delay.js}