Skip to content

How to make Mockoon recognize correct endpoint with query params from the request #839

Answered by 255kb
anapalmac asked this question in Help
Discussion options

You must be logged in to vote

Mockoon is using Express.js, so all of Express' routing rules apply.
If you define your routes in this order, the :id parameter will "intercept" the /MyService/Clients/search call and consider search to be the id.
You need to reorder your routes by drag and dropping them, to put the more specific first:

GET /MyService/Clients/search
GET /MyService/Clients/:id

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@anapalmac
Comment options

Answer selected by anapalmac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants