FeatureFuel
1

Add cancelHook for plugins

Source: Kong/insomnia#3727 · opened by @PieterJanVanAeken
• Insomnia Version: 6.5.4
• Operating System: Elementary OS 5.0

Details


I think it could be useful to make available cancel hooks in the plugins, similar to the response hooks.

Use case:

When I do not specify a storage key in the prompt plugin, I expect to get reprompted for every request. This works fine, provided the request results in a response, which cleans up the cache through the response hook.

However, if I cancel the request (for instance, because it cannot be fulfilled and I do not want to enforce timeouts), I need to restart the application to clear the cache.

I could (and have) modified the prompt plugin to include a flag to reprompt every time, but this is not the ideal behaviour either as prompts could be rendered multiple times for a single request.

The ideal solution would be to have a form of cancelHook, which allows for cleanup of the cache upon cancellation of the request.

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests