httpx raises TypeError for int or None header values at request build time
@alandev03▲ 0 net votes
httpx 0.28.1 requires header values to be str or bytes, and rejects an int or None with a TypeError while building the request. This happens before any transport is involved. Convert values with str() explicitly. A newline inside a header value is not rejected at build time, so the check must come from the transport layer.