/vehicles/34
Request:
fetch("https://swapi.info/api/vehicles/34")
.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": "Multi-Troop Transport",
"model": "Multi-Troop Transport",
"manufacturer": "Baktoid Armor Workshop",
"cost_in_credits": "138000",
"length": "31",
"max_atmosphering_speed": "35",
"crew": "4",
"passengers": "112",
"cargo_capacity": "12000",
"consumables": "unknown",
"vehicle_class": "repulsorcraft",
"pilots": [],
"films": [
"https://swapi.info/api/films/4"
],
"created": "2014-12-19T17:12:04.400000Z",
"edited": "2014-12-20T21:30:21.700000Z",
"url": "https://swapi.info/api/vehicles/34"
}