問題描述
閱讀有關 POST 和 get 方法的內容后這里有這樣的語句當使用 post 方法時,它使用 HTTP 請求正文.它是什么意思"HTTP 請求正文.?
Upon reading stuffs about POST and get methods here there is a statement like " when used post method it uses HTTP request Body . What Does it mean " HTTP request body".?
推薦答案
HTTP Body Data 是 HTTP 事務消息中傳輸的數據字節,如果有,則緊跟在 headers 之后(在 HTTP/0.9 的情況下,不傳輸 headers).
HTTP Body Data is the data bytes transmitted in an HTTP transaction message immediately following the headers if there is any (in the case of HTTP/0.9 no headers are transmitted).
大多數 HTTP 請求都是沒有正文的 GET 請求.但是,使用主體模擬請求對于適當地強調代理代碼和測試處理此類請求的各種鉤子很重要.大多數帶有正文的 HTTP 請求使用 POST 或 PUT 請求方法.
Most HTTP requests are GET requests without bodies. However, simulating requests with bodies is important to properly stress the proxy code and to test various hooks working with such requests. Most HTTP requests with bodies use POST or PUT request method.
消息正文
消息正文部分對于 HTTP 消息是可選的,但如果它可用,則它用于攜帶與請求或響應關聯的實體主體.如果實體主體是關聯的,那么通常 Content-Type 和 Content-Length 標頭行指定關聯主體的性質.
The message body part is optional for an HTTP message but if it is available then it is used to carry the entity-body associated with the request or response. If entity body is associated then usually Content-Type and Content-Length headers lines specify the nature of the body associated.
消息體是承載實際HTTP請求數據(包括表單數據和上傳等)和來自服務器的HTTP響應數據(包括文件、圖像等)的消息體.以下是消息正文的簡單內容:
A message body is the one which carries actual HTTP request data (including form data and uploaded etc.) and HTTP response data from the server ( including files, images etc). Following is a simple content of a message body:
<html>
<body>
<h1>Hello, World!</h1>
</body>
</html>
有關 HTTP 消息和正文的更多詳細信息,請參閱 w3org 鏈接
For more details to HTTP messages and bodies refer to w3org link
這篇關于http請求正文是什么意思?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!