Open kierate opened 5 years ago
great solution, what happened?
This is great feature, what happened which this pull request? Thanks you so much 😄
Has this PR been rejected silently?
Any news?
Can this please be merged?
I was looking for something exactly like this. There don't appear to be any showstoppers here from merging this, right?
This should be merged. Keeping a PR open for this long is never a good Idea. Reject or (resolve conflicts and) merge, but please don't ignore, dear Axios authors.
@ctimmerm ?
Such a needed and requested feature :disappointed:
Still not merged after 2 years?
It's possible that this project is dead, but only @ctimmerm knows, and @ctimmerm doesn't say 🤨
https://github.com/pillarjs/path-to-regexp could be embed, it's used in express and react-router
I used a different approach which doesn't require a 3rd argument in https://github.com/ctimmerm/axios-mock-adapter/pull/316/files.
Working with route params is more convenient than defining the regex in the matcher itself (avoids duplication of regexes for similar routes, allows using the same routes you have on the backend or in the API spec etc.)
This implementation:
config.routeParams
:userId
) and curly braces ({userId}
) for route paramsExample using the colon notation:
Example using the curly braces notation:
This addresses requests from https://github.com/ctimmerm/axios-mock-adapter/issues/199 and https://github.com/ctimmerm/axios-mock-adapter/issues/82