Payloads of HTTP Request Methods

前端 未结 3 940
梦谈多话
梦谈多话 2020-11-29 16:09

The Wikipedia entry on HTTP lists the following HTTP request methods:

  • HEAD: Asks for the response identical to the one that would correspond t
3条回答
  •  情话喂你
    2020-11-29 17:08

    Here is the summary from RFC 7231, an updated version of the link @Darrel posted:

    • HEAD - No defined body semantics.
    • GET - No defined body semantics.
    • PUT - Body supported.
    • POST - Body supported.
    • DELETE - No defined body semantics.
    • TRACE - Body not supported.
    • OPTIONS - Body supported but no semantics on usage (maybe in the future).
    • CONNECT - No defined body semantics

    As @John also mentioned, all request methods support query strings in the URL (one notable exception might be OPTIONS which only seems to be useful [in my tests] if the URL is HOST/*).

    I haven't tested the CONNECT and PATCH methods since I have no interest in them ATM.

提交回复
热议问题