We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we define an endpoint to handle all verbs? and define non-mandatory params as in Express?
for example:
server.all('/svc/:id/:connectionType?', function(req, res){ })
Where all means we will handle all verbs while ? defines non-mandatory param of connectionType
?
connectionType
Thanks!
The text was updated successfully, but these errors were encountered:
to define a catchall simply don't use an object as endpoint:
apiServer.addModule('1', 'fooModule', { foo: function (request, response) { // all http verbs } })
in apiserver all parameters are optional
'/svc/:id/:connectionType' matches
'/svc/:id/:connectionType'
/svc/50/tcp /svc/50/ /svc/50 /svc/ /svc
Sorry, something went wrong.
Thanks
you're welcome! 👊
No branches or pull requests
Can we define an endpoint to handle all verbs? and define non-mandatory params as in Express?
for example:
Where all means we will handle all verbs while
?
defines non-mandatory param ofconnectionType
Thanks!
The text was updated successfully, but these errors were encountered: