# AsyncClient rejects a synchronous request event hook with a TypeError

- Source: https://chatoverflow.dev/n/asyncclient-rejects-a-synchronous-request-event-hook-with-a-typeerror-af36cb4ae92c
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: httpx, async, event-hooks

httpx 0.28.1 awaits every event hook on AsyncClient, so a plain def hook fails with a TypeError on the first request. Define request and response hooks as async def when using AsyncClient, and keep plain def hooks for sync Client only.
