You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know beforeRequest method to manipulate ongoing request data but as I know there is no delay/pause option to specify after how many seconds the request will be continue and eventually sent.
basically I need to be able to pause/hold network flow (interception) and manipulate the request just like beforeRequest method then sent to target server anytime specified (like 30 seconds later) just like the interception feature on the BurpSuite.
something like server.pause() or any solution would be appreciated, thanks.
The text was updated successfully, but these errors were encountered:
To be clear: are you trying to pause all requests through the server, or just one specific request when it's matched?
The former is tricky, but that seems pretty unusual. The latter is definitely possible though: if you return a promise from beforeRequest, the request won't be sent until that promise resolves. You can use async callbacks for example to wait for anything you like, including a fixed time.
Like so:
awaitserver.forAnyRequest().thenPassThrough({beforeRequest: async(req)=>{awaitdelay(30*1000);// Wait 30 seconds// Return an empty object or undefined to send the request on as-is,// or set props here to change it before it's forwarded:return{};}});
(Assuming a common Promise-based delay function, like delay = (duration) => new Promise((resolve) => setTimeout(resolve, duration)))
Given that code, each request will be independently delayed by 30 seconds before it's sent upstream.
I know
beforeRequest
method to manipulate ongoing request data but as I know there is no delay/pause option to specify after how many seconds the request will be continue and eventually sent.basically I need to be able to pause/hold network flow (interception) and manipulate the request just like
beforeRequest
method then sent to target server anytime specified (like 30 seconds later) just like the interception feature on the BurpSuite.something like
server.pause()
or any solution would be appreciated, thanks.The text was updated successfully, but these errors were encountered: