使用HEAD请求POST数据 [英] POST data with HEAD Request
问题描述
是否可以使用HEAD请求发送POST数据?
Is it possible to send POST data with a HEAD Request?
推荐答案
不,HEAD请求与POST不同请求。 HEAD请求不接受发布数据。来自 HTTP规范第9.4节:
No, a HEAD request is different from a POST request. A HEAD request does not accept post data. From the HTTP specification section 9.4:
HEAD方法与GET相同,只是服务器不能在响应中返回消息体。响应HEAD请求的HTTP头中包含的元信息应该与响应GET请求时发送的信息相同。该方法可用于获得关于请求所暗示的实体的元信息,而无需转移实体主体本身。此方法通常用于测试超文本链接的有效性,可访问性和最近的修改。
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification.
由于GET请求不包含发布数据,HEAD请求也没有。
Since a GET request does not contain post data, a HEAD request also does not.
这篇关于使用HEAD请求POST数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!