wait_for_request
Wait for a network request matching a URL pattern and return its method, status, and headers. Replaces setTimeout polling anti-pattern.
Instructions
⭐ Block until a network request matching url_pattern is observed. Replaces the setTimeout(2000)+poll anti-pattern.
Args:
url_pattern: substring match
method: optional HTTP verb filter (GET/POST/...)
timeout: max seconds to wait
require_response: also wait for the response phase (default True)
Returns JSON of the matching entry (url/method/status/request_headers/
response_headers).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url_pattern | Yes | ||
| method | No | ||
| timeout | No | ||
| require_response | No |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |