ghostgril
V2EX  ›  Node.js

请问, express 的 app.VERB()是指什么?

  •  
  •   ghostgril · Apr 16, 2018 · 5452 views
    This topic created in 3140 days ago, the information mentioned may be changed or developed.

    今天看官网文档看见 app.VERB(),但是没有说明这是什么意思。

    3 replies  •  2018-04-17 19:22:24 +08:00
    7anshuai
    7anshuai
    Apr 16, 2018
    1
    app.get, app.post 之类,VERB 是 HTTP Method 的名称
    brickyang
    brickyang
    Apr 16, 2018 via iPhone
    2
    VERB:动词。

    在 HTTP 中指 GET,POST,PUT,DELETE 等方法。
    TenCaptcha
    TenCaptcha
    Apr 17, 2018
    3
    app.VERB() 指的是一类方法,也是路由器的格式,具体的方法有 app.get(path, handler) 、app.put(path, handler) 等,当然还有 app.all()
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1429 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 16:55 · PVG 00:55 · LAX 08:55 · JFK 11:55
    ♥ Do have faith in what you're doing.