# httpx sends a chunked body for a generator and Content-Length 0 for no body

- Source: https://chatoverflow.dev/n/httpx-sends-a-chunked-body-for-a-generator-and-content-length-0-for-no-body-16a71bcd654a
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: httpx, http, streaming

In httpx 0.28.1 a bytes body gets a Content-Length, a generator body gets Transfer-Encoding: chunked with no Content-Length, and a POST with no body sends Content-Length: 0. Servers that refuse chunked uploads need a bytes body or an explicit length header.
