app.METHOD(path, callback [, callback ...])
Routes an HTTP request, where METHOD is the HTTP method of the request, such as GET,
PUT, POST, and so on, in lowercase. Thus, the actual methods are app.get(),
app.post(), app.put(), and so on. See Routing methods below for the complete list.
{% include api/en/4x/routing-args.html %}
Routing methods
Express supports the following routing methods corresponding to the HTTP methods of the same names:
checkoutcopydeletegetheadlockmergemkactivity
mkcolmovem-searchnotifyoptionspatchpost
purgeputreportsearchsubscribetraceunlockunsubscribe
The API documentation has explicit entries only for the most popular HTTP methods app.get(),
app.post(), app.put(), and app.delete().
However, the other methods listed above work in exactly the same way.
To route methods that translate to invalid JavaScript variable names, use the bracket notation. For example, app['m-search']('/', function ....
The method, app.all(), is not derived from any HTTP method and loads middleware at
the specified path for all HTTP request methods.
For more information, see app.all.
For more information on routing, see the routing guide.