What 302 means
A temporary redirect. Keep using the original URL in future. Like 301, clients may switch POST to GET; 307 prevents that.
Common causes
- Login redirects, temporary maintenance pages, load balancing.
How to fix it
If you're calling an API
- Follow the Location header (curl -L). If an API redirects you to a login page, your auth is missing.
If you run the server
- Use 307 for APIs so the method and body are kept.
Should you retry?
Follow Location.
Example response
HTTP/1.1 302 Found
Location: https://example.com/loginRelated headers: Location.
Defined in: RFC 9110 (HTTP Semantics). 302 is a redirection.