TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Except cookies which parameter is sent in every HTTP request?

4 点作者 dedalus超过 7 年前

4 条评论

BjoernKW超过 7 年前
Even cookies aren&#x27;t required (see <a href="https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc2616" rel="nofollow">https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc2616</a> and <a href="https:&#x2F;&#x2F;serverfault.com&#x2F;questions&#x2F;163511&#x2F;what-is-the-mandatory-information-a-http-request-header-must-contain" rel="nofollow">https:&#x2F;&#x2F;serverfault.com&#x2F;questions&#x2F;163511&#x2F;what-is-the-mandato...</a> for an explanation). It entirely depends on the client and convention.<p>That said, browsers typically send headers such as ACCEPT, REFERER and USER_AGENT (see <a href="https:&#x2F;&#x2F;www.whatismybrowser.com&#x2F;detect&#x2F;what-http-headers-is-my-browser-sending" rel="nofollow">https:&#x2F;&#x2F;www.whatismybrowser.com&#x2F;detect&#x2F;what-http-headers-is-...</a> for a complete list of headers for your browser).
prostanac超过 7 年前
The HTTP&#x2F;1.1 RFC[0] specifies that the host header MUST be included in each request.<p><pre><code> &gt;A client MUST include a Host header field in all HTTP&#x2F;1.1 request &gt;messages . If the requested URI does not include an Internet host &gt;name for the service being requested, then the Host header field MUST &gt;be given with an empty value. An HTTP&#x2F;1.1 proxy MUST ensure that any &gt;request message it forwards does contain an appropriate Host header &gt;field that identifies the service being requested by the proxy. All &gt;Internet-based HTTP&#x2F;1.1 servers MUST respond with a 400 (Bad Request) &gt;status code to any HTTP&#x2F;1.1 request message which lacks a Host header &gt;field. </code></pre> [0] <a href="https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc2616#page-128" rel="nofollow">https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc2616#page-128</a>
imauld超过 7 年前
Depends on the client I would imagine. This is what cURL sends by default:<p><pre><code> &gt; Host: google.com &gt; User-Agent: curl&#x2F;7.54.0 &gt; Accept: *&#x2F;*</code></pre>
taf2超过 7 年前
Etag and Last modified since, headers?