V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
httpbin - 协议调试工具
httpstatuses - 协议状态码查询
httpie - cURL-like tool for humans
Fiddler
wencan
V2EX  ›  HTTP

HTTP 协议 HEAD 请求,会有查询字符串吗?

  •  
  •   wencan · 2022-11-21 20:30:13 +08:00 · 919 次点击
    这是一个创建于 515 天前的主题,其中的信息可能已经有所发展或是发生改变。
    HEAD 请求,用得较少。
    HEAD 似乎就是 GET 去掉响应 Body
    但我没找到地方讲 HEAD 会不会跟 GET 一样,有查询字符串。
    如果有,麻烦给个 existed 的例子

    如果其它方法,也会有查询字符串,请指教
    3 条回复    2022-11-21 20:37:18 +08:00
    ss098
        1
    ss098  
       2022-11-21 20:32:28 +08:00
    查询字符串是指 Query String 吗,任何 HTTP 方法都有 Query String 的,它是 URL 的一部分。
    eason1874
        2
    eason1874  
       2022-11-21 20:34:42 +08:00
    有查询字符串,HEAD 跟 GET 唯一区别就是服务器不提供响应主体

    想知道各种方法的区别,找 RFC 看下就知道了
    arischow
        3
    arischow  
       2022-11-21 20:37:18 +08:00
    > The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.

    https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2717 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:56 · PVG 22:56 · LAX 07:56 · JFK 10:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.