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

Support for handling all live requests? #80

Open
tgabre opened this issue Jan 7, 2020 · 2 comments
Open

Support for handling all live requests? #80

tgabre opened this issue Jan 7, 2020 · 2 comments

Comments

@tgabre
Copy link

tgabre commented Jan 7, 2020

I'm using a single yaml file and Stubby to handle all live requests to an api.
Is there any support for Stubby to use a single file to dynamically handle all live requests, as such?

-  request:
      url: ^/.+
      method: [GET, POST]
   response:
      status: 302
      headers: 
         Location: https://liveEndpoint.com<% url[0] %>

As of right now, all requests going through Stubby are GETs despite the client app sending out GETs and POSTs.

@mrak
Copy link
Owner

mrak commented Jan 21, 2020

You should be able to use a wildcard url; it is just a regex match.

@tgabre
Copy link
Author

tgabre commented Jan 24, 2020

I have no problems with the urls, the regex match just fine. My problem is the request methods don't act dynamically. I list out GET and POST in the method field. My client will send GETs, which Stubby intercepts and acts in an expected manner. The client will subsequently send a POST, only for Stubby to intercept and send a GET.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants