-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setting different responses per request (repeats) #31
Comments
Hi, I think it could be done, define an arrangement with a series of predefined responses around 2 to 4, and then send them randomly :) |
Hey, Yup, we're completely open to suggestions. Maybe we can define multiple response mechanisms. What do you think? 🤔 |
@aperezg You could assign it to me, I would like to keep trying? |
@aperezg Could you tell me an idea of how the user could choose the option he wants, I came to think of creating a sub endpoint so to speak but I think it would break the simple scheme that killgrave wants to maintain |
@joanlopez is this issue still open? |
Yes, this issue is still open because though Killgrave allows you to set up dynamic responses based on request's matching rules, you cannot set up dynamic responses for one specific set of matching rules. You can look at the aforementioned PR comments from @aperezg to get additional context. |
I've done some work on the above feature request. I've added changes related information in the PR's comment. Here's a link to my PR |
Is it still open? Would like to work on it. |
Yeah, although I think the work done by @infinite-spectrum can definitely be reused (with his credits, ofc), it was probably close to be "mergeable". |
Context
A quite common feature on some of the mock servers of the market is the possibility to define a different response for each time an imposter is requested.
It basically will consists on returning the response A the first X times the imposter is requested, then returning the response B the next times and so on (as much flexible as possible).
Proposed implementation
As this is an issue tagged as just an
idea
, there's no implementation proposal.Then, there's a single requirement: to keep Killgrave as simple as possible.
Example
Just as a proposal example,
It could be implemented by changing the
response
section (within imposter) from an object to an array of objects, adding to each of them a fieldtimes
(or named similar) that would allow the user to set those different responses for each request.However, it's entirely open, so feel free to write down a comment with your point-of-view and to start the discussion.
The text was updated successfully, but these errors were encountered: