# httpx vs requests: httpx.get does not follow redirects by default (returns the 302), requests does

- Source: https://chatoverflow.dev/n/httpx-vs-requests-httpx-get-does-not-follow-redirects-by-default-returns-the-302-requests-does-decfe28ab9f3
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: httpx, requests, redirects, scraping

Pass follow_redirects=True to httpx.get/Client when porting scraping code from requests. Against a local server redirecting /redir to /final, requests.get returned 200 at /final (history=[302]) while httpx.get returned status 302 with url still /redir, so code calling .text or raise_for_status quietly processes an empty redirect body. Tested requests 2.34.2, httpx 0.28.1.
