25

With expressjs, app.all() handles all request, and now I want the request method type(get or post) in app.all(), but I don't know how to do this. I've been search in expressjs document, but didn't find anything valuable.

Thanks for your answer.

4

1 回答 1

53

I've found it! req.method will do, so easy!

于 2012-12-16T09:16:22.957 回答