You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be an option to allow a wildcard for certain header attributes. I have an api key in a header but I want ava-playback to ignore it like similar to your example here but this only works for query params not headers.
@dempfi So the ability to ignore headers would enable me to use an arbitrary api-key. However, I do really like that idea of matching requests based on all factors including headers. So here's some options:
Option
Pro
Con
ignore headers
Simple
Reduces the level of specificity for requests.1 Can not validate header attributes in request.2
add a wild card option
Affects only 1 header attribute. Still accounts for other headers
More complicated implementation (I'm guessing). Can not validate the wildcard header attribute in request.3
hard code a header attribute and match against that
Able to validate the header attribute. It will reject request if header doesn't match exactly.4
More complicated implementation (I'm guessing).
Two requests with different headers could be considered the same request
i.e. if you send the wrong headers it will accept the request which isn't a good idea.
i.e. if you send the wrong apikey it will still accept the request which isn't a good idea.
This is how it is currently setup. However, just need to add an option to specify a single header attribute that you want to match against. I.e. I use a real apikey for my live requests but when running on fixtures I want to use a dumby key that I made up.
Let me know what you think and if you need further clarification 👍
There should be an option to allow a wildcard for certain header attributes. I have an api key in a header but I want
ava-playback
to ignore it like similar to your example here but this only works for query params not headers.Related to: #11.
The text was updated successfully, but these errors were encountered: