Redirects
Redirect chains, every redirect status, a local-only redirect-to, and an infinite loop for max-redirect tests. Every chain ends at /api/echo so the client can see the final method and body it arrived with.
- GET
https://api.testingapis.com/api/redirect/{n}Starts a redirect chain ofnhops that ends at/api/echo. - GET
https://api.testingapis.com/api/redirect/absolute/{n}Starts a redirect chain ofnhops that uses absolute URLs. - GET
https://api.testingapis.com/api/redirect/loopStarts an infinite redirect loop between/loopand/loop/back. - GET
https://api.testingapis.com/api/redirect/loop/backContinues the infinite redirect loop back to/loop. - GET
https://api.testingapis.com/api/redirect/relative/{n}Starts a redirect chain ofnhops that uses relative references. - GETPOSTPUTPATCHDELETEHEAD
https://api.testingapis.com/api/redirect/status/{code}Redirects to/api/echowith the chosen redirect status. - GETPOSTPUTPATCHDELETEHEAD
https://api.testingapis.com/api/redirect/toRedirects to a local path on this server.
Example request
Starts an infinite redirect loop between /loop and /loop/back. Full reference and a Send button.
cURL
curl -X GET "https://api.testingapis.com/api/redirect/loop"Response · 302 Found
{
"status": 302,
"statusText": "Found",
"location": "/api/redirect/loop/back",
"remaining": null,
"keepsMethod": false
}