TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Starts a redirect chain of n hops that uses absolute URLs

GEThttps://api.testingapis.com/api/redirect/absolute/{n}Sign in to see this endpoint's URL

Starts a redirect chain of n hops that uses absolute URLs.

The Location host is taken from the request's Host header.

Parameters 1

NameTypeDescription
nrequiredpath · integer (int32)Number of redirects remaining, 1-20.

Responses

200
OK
302
Redirect to the next hop, as a full URL.
400
n outside 1-20.

Example

Request
curl -X GET "https://api.testingapis.com/api/redirect/absolute/3" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response302 Found
Location: https://api.testingapis.com/api/redirect/absolute/2

{
  "status": 302,
  "statusText": "Found",
  "location": "https://api.testingapis.com/api/redirect/absolute/2",
  "remaining": 3,
  "keepsMethod": false
}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.