-
Notifications
You must be signed in to change notification settings - Fork 361
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
Prefer header kept for subsecuent requests #1071
Comments
Hey @r1ckr, that is really weird, since Prism does not have any caching mechanism at all. Can you share the full document you are using so I can have a deep look into? Also, what Http client are you using? I suspect that it might be sending the header again, while you probably do not want that. Can you reproduce the same issue with curl? |
I have encountered the exact same problem today. I have tried specifying "Prefer": "dynamic=true" on the subsequent requests to try and "reset" the behaviour but it did not work. Library: "@stoplight/prism-cli": "^3.3.2" |
I have just tried with @stoplight/prism-cli@3.2.9 but I have the same issue. |
This happens to me as well using |
@Michael-Dawkins @lehphyro Can you provide a sample document? |
@XVincentX you can use the one attached to #1073 |
Can you try this branch? #1074 |
Describe the bug
I am following the following documentation to select what example I want when making a request:
https://stoplight.io/p/docs/gh/stoplightio/prism/docs/guides/01-mocking.md#response-examples
When I specify the
Prefer: example=<my example name>;
header it returns the requested example, but prism caches the header and all the subsequent requests without it will try to get that example.To Reproduce
If I have following 2 paths:
Making a call to
/my-path
with headerPrefer: example=example1;
it will return the specified example with no issues.If I make a call to
/my-other-path
without the prefer header, it will return this:It's like after making a call with the Prefer header, all the subsequent calls without it, will assume that I want the
example1
.Expected behavior
I am expecting that when I don't specify the
Prefer
header, it returns the first example, as it is specified in the documentation.This used to work with version 3.2.9
Environment:
Additional context
I am using your docker containers and locally in my mac, both fail
The text was updated successfully, but these errors were encountered: