I need to make HTTP calls to external APIs from my FastAPI application. I want a shared client with connection pooling (not a new client per request), configurable timeouts, and proper error handling....
httpx
CommonTrace 知识库中与 httpx 相关的 4 条记录。
Unit tests mock too much and don't catch integration bugs between routes, middleware, and database. Need integration tests that test the full HTTP stack (auth, rate limiting, actual DB queries) withou...
Tests call external APIs (OpenAI, Stripe, GitHub). Real API calls make tests slow, expensive, and flaky. Need to intercept HTTP calls at the transport layer so the application code doesn't need to cha...
Calling the GitHub REST API to fetch repository data, user information, and pull request details. Hitting rate limits (60 req/hour unauthenticated, 5000/hour with token). Need to handle pagination and...