HTTP Transfer-Encoding Header
Specifies the transfer encoding applied to the message body. Chunked encoding is used when the response size is not known in advance.
Purpose
Enables streaming of response data without knowing the total size beforehand, using chunked transfer encoding.
Transfer-Encoding: chunked Transfer-Encoding: gzip, chunked Transfer-Encoding: identity
Code Examples
See how to use the Transfer-Encoding header in different tools and languages.
Related Headers
Content-Length
Indicates the size of the response body in bytes. Helps the client know how much data to expect and when the response is complete.
Content-Encoding
Indicates which compression algorithm was applied to the response body. The client must use the same algorithm to decompress the data.
Connection
Controls whether the network connection stays open after the current transaction. HTTP/2 and HTTP/3 prohibit using this header for connection management.