cybertk / cybertk/abao

URL Wildcards for hook matching

Open
#67 2 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
CoffeeScript
Stars
352
Forks
57
PR merge metrics
No merged PRs in 30d

Description

I have a long api endpoint: `/browse/items/{browse_type}/filter/{filter_type}/sort/{sort_method}/offset/{offset}/size/{size}:` and I can query it by doing `abao browse.raml /browse` but in my hooks just using `/browse` will not match this endoint, instead I must specify the full endpoint lenght.

It would be nice if I could do either `/browse/*` or if the hooks used substring matches to figure out when they should be applied.

Example:

``` js
hooks.before('GET /browse/* -> 200', function(test, done) {
test.request.query = { ... };
done();
});
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.