/vehicles/26
Request:
fetch("https://swapi.info/api/vehicles/26")
.then((res) => res.json()) // Parse the JSON content from the API to be consumed
.then((json) => console.log(json)) // Log the JSON response to your console
.catch((error) => console.error(error)) // Log the API error (if any) to your console
Result:
{
"name": "TIE/IN interceptor",
"model": "Twin Ion Engine Interceptor",
"manufacturer": "Sienar Fleet Systems",
"cost_in_credits": "unknown",
"length": "9.6",
"max_atmosphering_speed": "1250",
"crew": "1",
"passengers": "0",
"cargo_capacity": "75",
"consumables": "2 days",
"vehicle_class": "starfighter",
"pilots": [],
"films": [
"https://swapi.info/api/films/3"
],
"created": "2014-12-18T10:50:28.225000Z",
"edited": "2014-12-20T21:30:21.691000Z",
"url": "https://swapi.info/api/vehicles/26"
}