-
Notifications
You must be signed in to change notification settings - Fork 837
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
Using the x-mock-match-request-headers will not return default response when header is not passed #8065
Comments
Hi, |
meow.mov
<https://drive.google.com/file/d/1GgppFq_rFef_xy6nh0X_oUibDIM1JvTq/view?usp=drive_web>
I am still unsure. I would think when i do not pass anything in the header
the default example would hit.. See the movie
…On Mon, Feb 17, 2020 at 10:47 PM Pranaya Tomar ***@***.***> wrote:
Hi,
When nothing is passed in the header then all 3 examples become equal
candidates for a response and one of them is chosen.
This happens because when the x-mock-match-request-headers header is not
sent (or no value is set therein), the headers set in the example requests
are ignored.
Hence, the examples 'default', 'ONE' and 'TWO' are all treated equally. In
your case, example 'ONE' was chosen.
Do let me know if this cleared things up. If not, do share the videos you
made.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8065?email_source=notifications&email_token=AATW5QSDHMSC2AVJG5KRMX3RDNR53A5CNFSM4KVMSDY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMASBOI#issuecomment-587276473>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATW5QRDVEKIRHT3KUVLWMDRDNR53ANCNFSM4KVMSDYQ>
.
|
All 3 examples are identical if their headers are ignored. The headers are ignored if the |
Describe the bug
While using a the x-mock-match-request-headers against my mock server, the default response is not returned when nothing is passed in the header.
To Reproduce
Steps to reproduce the behavior:
a. Default example. Response should be
c. example named TWO when a key: values of number:two is set for the header. Response should be
number: one | two
x-mock-match-request-headers: number
This works correctly.
and the response is the example when the header value is one:
Expected behavior
When nothing is passed in the header, the default response would return.
I have made a couple videos that I can share to illustrate the issue.
The text was updated successfully, but these errors were encountered: