Content-Length

The size of the body in bytes.

Explained

Examples

Example

Content-Length: 348

Watch out

It counts bytes, not characters: "é" is 2 bytes in UTF-8. A wrong value can cut a body short or leave a connection hanging.

Defined in RFC 9110 §8.6.

Other common headers