Skip to content

Allow setting different responses per request (repeats) #31

@joanlopez

Description

@joanlopez

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 field times (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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions