npx skills add ...
npx skills add microsoft/debugpy --skill requests
npx skills add microsoft/debugpy --skill requests
Best practices for HTTP client usage with Requests including sessions, error handling, and timeouts.
Best practices for HTTP client usage with Requests including sessions, error handling, and timeouts.
Apply this skill when making HTTP requests with the Requests library — sessions, auth, error handling, retries, and file uploads.
requests.Session() for connection pooling and persistent headers/cookies across multiple requests.session.headers for default auth tokens and user-agent strings.session.mount() with HTTPAdapter for retry logic.response.raise_for_status() to surface HTTP errors as exceptions.timeout=(connect_timeout, read_timeout) — never use infinite timeouts.requests.ConnectionError, requests.Timeout, and requests.HTTPError explicitly.urllib3.util.Retry with HTTPAdapter for automatic retries with backoff.verify=False) in production.auth= parameter for HTTP auth rather than manually setting headers.requests.get() for high-throughput — use sessions.stream=True) to release connections.