-
Notifications
You must be signed in to change notification settings - Fork 694
Open
Labels
Description
Problem to solve
Accepting multiple status codes.
Useful for repeatable scripts where we DELETE resources at the beginning and leave them at the end. We need to accept both 200 and 404 for the DELETE request.
Proposals
Extend the HTTP syntax
HTTP 200,404
Very straighforward and easy to understand.
Add the or keyword
[Asserts]
status == 200 or status == 404
Allows full logical expressivity (essentially CNF).
Add the in predicate
[Asserts]
status in [200, 404]
More explicit than regex, works for integer types.
Workaround
It's possible to achieve this behavior using existing tools but is human and AI unfriendly:
HTTP *
[Asserts]
status toString matches /^(200|404)$/