リダイレクト
リダイレクトのチェーン、すべてのリダイレクトステータス、ローカル専用の redirect-to、最大リダイレクト数のテスト用の無限ループ。どのチェーンも最後は /api/echo に着くので、クライアントは到着時のメソッドとボディを確認できます。
あなたのアカウントでこれらのエンドポイントが使えます。各エンドポイントのページの Try it でリクエストを送れます。
- 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.
リクエストの例
Starts an infinite redirect loop between /loop and /loop/back. 完全なリファレンスと Send ボタン(英語).
cURL
curl -X GET "https://api.testingapis.com/api/redirect/loop"レスポンス · 302 Found
{
"status": 302,
"statusText": "Found",
"location": "/api/redirect/loop/back",
"remaining": null,
"keepsMethod": false
}サインインして詳細を見る
これらのエンドポイントのパラメータ、リクエストとレスポンスの例、ライブの Try it パネルは、サインインしたメンバー向けです。アカウントは無料で、数秒で作成できます。