httpx icon indicating copy to clipboard operation
httpx copied to clipboard

Add missing `| None` to auth parameter in convenience methods

Open bysiber opened this issue 9 months ago • 0 comments

The options(), head(), post(), put(), patch(), and delete() methods on both Client and AsyncClient are missing | None in their auth parameter type annotation.

This is inconsistent with get(), request(), send(), and stream() which all accept auth: AuthTypes | UseClientDefault | None.

Passing auth=None to explicitly opt out of authentication is a valid use case already supported at runtime, but the type annotations on these methods would incorrectly flag it.

bysiber avatar Feb 20 '26 00:02 bysiber