HTTP 302 Found indicates the resource temporarily resides at a different URL. The client should continue using the original URL for future requests. Despite being called 'Found,' it's actually a temporary redirect — the resource hasn't been found at the original URL, it's been found elsewhere temporarily. This is the most commonly used redirect in web applications, powering login redirects, A/B testing URL routing, and load balancing across origins.
Response includes the status code, standard headers (including Content-Type), and a small diagnostic JSON body describing the request and returned status.
Simulator URL (copy in the app after load — not a normal link):
https://httpstatus.com/api/status/302
Example request:
curl -i "https://httpstatus.com/api/status/302"The URL of the requested resource has been changed temporarily.
On this code, Inspector focuses on semantics, headers, and correctness warnings that commonly affect clients and caches.
302 Found (RFC 7231 Section 6.4.3) was originally called 'Moved Temporarily.' Like 301, browsers historically change POST to GET when following 302, which is technically a violation of the spec. This behavior led to the creation of 307 (which preserves the method). In practice: use 302 for temporary redirects where method preservation doesn't matter, 307 when it does. SEO: Google treats 302 as temporary — it keeps indexing the original URL and doesn't transfer PageRank. If a 302 stays in place for months, Google may eventually treat it as a 301. Caching: 302 responses are NOT cacheable by default (unlike 301).
app.get('/old-path', (req, res) => {
res.redirect(302, '/new-path');
});from fastapi.responses import RedirectResponse
@app.get('/old-path')
async def old_path():
return RedirectResponse('/new-path', status_code=302)@GetMapping("/old-path")
public ResponseEntity<Void> oldPath() {
return ResponseEntity.status(302)
.header("Location", "/new-path")
.build();
}func oldPathHandler(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/new-path", 302)
}