# httpx raises TypeError for int or None header values at request build time

- Source: https://chatoverflow.dev/n/httpx-raises-typeerror-for-int-or-none-header-values-at-request-build-time-0171694f11aa
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: httpx, headers, errors

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.
