Skip to content
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

Add support for URL parameters #5

Open
domdom82 opened this issue Nov 7, 2019 · 0 comments
Open

Add support for URL parameters #5

domdom82 opened this issue Nov 7, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@domdom82
Copy link
Owner

domdom82 commented Nov 7, 2019

It maybe tedious to upload an entire config.yml just to change a single endpoint.
A good example might be a /slow endpoint:
It usually waits for a defined time and then responds back to the client.

Now instead of testing various config.yml every time we want to make a change in the slowness, we could allow endpoint parameters to be overridden via URL parameters.

E.g.

GET /slow?delay=5s

this would overwrite the config.yml entry:

servers:
  - http:
      port: 8080
      responses:
        /slow:
          get:
            static:
              - status: 200
                body: this is a slow response
                delay: 500ms  << here

Things to consider:

  • Be vary of sequences and loops.
  • If we want to support that full circle, this means if you want to change the delay of the 3rd response in a sequence you have to do 2 GETs without the parameter, then one GET with the parameter
@domdom82 domdom82 added the enhancement New feature or request label Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant