Delay request/response
See original GitHub issueHi!
Would be great to have ability to delay request to backend server or response to client in onProxyReq
or onProxyRes
hooks respectively. I think this can be done by returning promise from this hooks (just proposal)
This is needed sometimes to emulate long backend response for some concrete url, not for all of them (this can be done with devtools network throttling).
Thank you!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Delay request-response mechanism of the PTP timing ...
... the standard PTP, the timing-exchange mechanism is called a delay request-response mechanism. This mechanism identifies the path of the time information ...
Read more >Delay between request/response - java - Stack Overflow
When there is no delay in between, response is not yet there (because it takes much more time to produce it than spent...
Read more >Best way to approach delay on Request/Response
My goal, is to move the delay mechanisms from the parent orchestration and manage them within the children processes. If the delay fires,...
Read more >Acceptable HTTP request-response delay - Server Fault
What is the acceptable HTTP request-response delay? I have a client-server application that takes 0.4 milliseconds as request-response ...
Read more >Delay request response in browser - SQA Stack Exchange
Fiddler from Telerik can be used to do that. Using these examples, you can put in a specified delay in ms per KB...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @klimashkin,
Been thinking about this feature too…
Decided not to implement this for the various reasons:
If you still want to delay (certain) requests, you can do it quite easily by chaining middlewares:
Awesome! Thanks for sharing the answer.
Think it would make an excellent candidate for a delay/latency recipe.
Do you mind creating a PR of the snippet and add it to the http-proxy-middleware recipes? https://github.com/chimurai/http-proxy-middleware/tree/master/recipes
All credits are yours of course.