express.js + PATCH verb

2020-06-07 02:13发布

Does Express support the HTTP verb "PATCH", as in:

app.patch("/api/resource", function(req, res){ ... });

I checked the docs and it seems pretty unclear to me. They discuss GET and POST, but seem to lump everything else under "all the other HTTP verbs".

标签: express
2条回答
Emotional °昔
2楼-- · 2020-06-07 02:28

Yes. Express supports not only HTTP verb "patch", but all 23 HTTP verbs. The documentation keeps entries for the most used ones. See this link.

http://expressjs.com/en/api.html#app.METHOD

查看更多
\"骚年 ilove
3楼-- · 2020-06-07 02:52

Yes.

Express.js has a dependency on node-methods. The list of supported methods is found here. The loop that creates the app.VERB methods for express is here.

查看更多
登录 后发表回答