cjstehno / ersatz

🤖 A simulated HTTP server for testing client code with configurable responses.
https://cjstehno.github.io/ersatz
Apache License 2.0
47 stars 5 forks source link

Add `any` method matcher #37

Closed cjstehno closed 7 years ago

cjstehno commented 7 years ago

It would be useful to add an any request matcher such that it would match any request method - with the ability to refine the match with the rest of the configuration (query, headers, etc).

server.expectations {
    any('/foo').responds().body('ok', TEXT_PLAIN)
}

so that GET /foo and POST /foo would both be matched by this expectation.

cjstehno commented 7 years ago

Implemented in development.