Weiterleitungen
Weiterleitungsketten, jeder Weiterleitungsstatus, ein nur lokales redirect-to und eine Endlosschleife für Tests der maximalen Weiterleitungen. Jede Kette endet bei /api/echo, damit der Client sieht, mit welcher Methode und welchem Body er angekommen ist.
Dein Konto schaltet diese Endpunkte frei. Nutze Try it auf der Seite jedes Endpunkts, um Requests zu senden.
Diese Endpunkte brauchen ein kostenloses Konto. Leg eins an oder melde dich an, um ihre Details zu sehen und sie hier auszuprobieren.
- GET
https://api.testingapis.com/api/redirect/{n}Starts a redirect chain of n hops that ends at /api/echoStarts a redirect chain ofnhops that ends at/api/echo. - GET
https://api.testingapis.com/api/redirect/absolute/{n}Starts a redirect chain of n hops that uses absolute URLsStarts a redirect chain ofnhops that uses absolute URLs. - GET
https://api.testingapis.com/api/redirect/loopStarts an infinite redirect loop between /loop and /loop/backStarts an infinite redirect loop between/loopand/loop/back. - GET
https://api.testingapis.com/api/redirect/loop/backContinues the infinite redirect loop back to /loopContinues the infinite redirect loop back to/loop. - GET
https://api.testingapis.com/api/redirect/relative/{n}Starts a redirect chain of n hops that uses relative referencesStarts a redirect chain ofnhops that uses relative references. - GETPOSTPUTPATCHDELETEHEAD
https://api.testingapis.com/api/redirect/status/{code}Redirects to /api/echo with the chosen redirect statusRedirects to/api/echowith the chosen redirect status. - GETPOSTPUTPATCHDELETEHEAD
https://api.testingapis.com/api/redirect/toRedirects to a local path on this serverRedirects to a local path on this server.
Beispiel-Request
Starts an infinite redirect loop between /loop and /loop/back. Vollständige Referenz und Send-Button (auf Englisch).
curl -X GET "https://api.testingapis.com/api/redirect/loop"{
"status": 302,
"statusText": "Found",
"location": "/api/redirect/loop/back",
"remaining": null,
"keepsMethod": false
}Melde dich an, um die Details zu sehen
Die Parameter, die Beispiele für Request und Antwort und das Live-Panel Try it für diese Endpunkte sind für angemeldete Mitglieder. Konten sind kostenlos und in wenigen Sekunden angelegt.