Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow setting different responses per request (repeats) #31
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
responsesection (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.