Handling multiple pending requests #3291
Replies: 2 comments 1 reply
-
@develohpanda can we show |
Beta Was this translation helpful? Give feedback.
-
My use-case (which inspired the bug report) is when I am working with an unreliable service. The service in question sometimes responds successfully within a couple of seconds but other times the request disappears into the service's void and the server's request timeout is eventually reached but I know long before the timeout is reached that the timeout will be reached. My workflow when working with the unreliable service is:
Solutions 1 and 3 would meet my use-case without requiring a change in workflow, with 3 being less helpful because I don't care about the eventual Response (which I know will be an error). Option 2 would require that I change my workflow to include a step where I cancel the pending Request -- currently there isn't a shortcut for that. As I think more through what you've written, it does seem potentially valuable for other use cases that multiple requests can run in parallel (e.g: someone might wish to test a race condition in their service) and there may even be people relying on the current unintentional behaviour for exactly that reason. On the other hand, there are services where parallel requests may cause unintended side effects and it is not desirable to be able to run parallel request. A solution that captures everything discussed here might be made up of:
I think one challenge around the user experience of parallel requests is that if someone is intentionally running requests in parallel then they are interested in the status and Response of each Request, rather than just being interested in the Response of the most recent Request. As such, only exposing the Response of the completed Requests via the Response history means the parallel Requests are "invisible" and a user of the client could easily run parallel Requests without realising... ...so perhaps the real answer is to remove the one to one relationship between the Request frame and the Response frame, and instead treat the Response frame as a history of all submitted Requests (pending and complete) with options to cancel pending Requests. Anyway, in summary, I don't have a strong view on the right solution :-) |
Beta Was this translation helpful? Give feedback.
-
Hi! 👋🏽
Recently a bug was reported outlining interesting behavior that occurs when sending a long running request, and then firing the same request again while the first is still pending. While this bug report is valid (#3277), it raised another question about how Insomnia should handle multiple firings of the same request.
Looking at other API clients, most tend to disable the "send" button while a request is active, to avoid multiple running at the same time. Whether intentionally or unintentionally, Insomnia currently allows the same request to be sent multiple times and I can see edge cases where that might be useful to some developers.
So, before we change that behavior we want your feedback! 🤗
There are a few options to handle (or not handle) multiple pending requests. These are:
Which of the above do you prefer, and would you like this behavior to be configuratble? If so, should it be configurable application wide, per collection/document, or per request? 🙌🏽
Beta Was this translation helpful? Give feedback.
All reactions