Movatterモバイル変換


[0]ホーム

URL:


  1. Glossary
  2. HTTP content

HTTP content

In HTTP messages, thecontent describes the 'information' conveyed in the message body (which follows the header section), after any message framing from HTTP/1.1 chunked transfer encoding has been removed.This was referred to as a "payload" in HTTP/1.1, but message "content" distinguishes from frame payloads in HTTP/2 and HTTP/3 where the data in a single frame could be header data, body data, or other control information.

The purpose of message content in HTTP requests and responses depends on the request method and response status code.For example, in aPUT request, the content represents the desired state of the resource, but in aPOST request, it is information to be processed.A200 OK response to aGET request shows the current state of the resource, while an error response describes the error.

Some responses, like those toHEAD requests or204 No Content and304 Not Modified status codes, do not include content at all.

In the following HTTP/1.1 response, the message body contains the contentMozilla Developer Network:

http
HTTP/1.1 200 OKContent-Type: text/plainMozilla Developer Network

In the next HTTP/1.1 response, transfer encoding encodes the data into chunks.The content is stillMozilla Developer Network in the end, but the message body includes different message data to separate the chunks:

http
HTTP/1.1 200 OKContent-Type: text/plainTransfer-Encoding: chunked7\r\nMozilla\r\n9\r\nDeveloper\r\n7\r\nNetwork\r\n0\r\n\r\n

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp