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

How to pass through every request in pretender? #228

Closed
priyanshujain opened this issue Mar 14, 2018 · 2 comments
Closed

How to pass through every request in pretender? #228

priyanshujain opened this issue Mar 14, 2018 · 2 comments

Comments

@priyanshujain
Copy link

I've tried this.get("**.", this.passthrough); but didn't worked.
How we can pass through every url requested after a bunch of uniques.
for example

this.get(`${apiBaseUrl}/data/`, function(request) {
    var data = require("./data.json");
    return [200, { "Content-Type": "application/json" }, JSON.stringify(data)];
  });
  this.get("**", this.passthrough);

API not matching first rule should pass through to real API call, how i can do that.

@nshimiye
Copy link

nshimiye commented May 3, 2018

@priyanshujain this.get("*path", this.passthrough) should work.

You can read more about Star segments on the Route Recognizer Github

@xg-wang
Copy link
Member

xg-wang commented Dec 22, 2019

route-recognizer and #238 can pretty much support any selection need for passthrough

@xg-wang xg-wang closed this as completed Dec 22, 2019
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

3 participants