/vehicles/25
Request:
fetch("https://swapi.info/api/vehicles/25")
.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": "Bantha-II cargo skiff",
"model": "Bantha-II",
"manufacturer": "Ubrikkian Industries",
"cost_in_credits": "8000",
"length": "9.5",
"max_atmosphering_speed": "250",
"crew": "5",
"passengers": "16",
"cargo_capacity": "135000",
"consumables": "1 day",
"vehicle_class": "repulsorcraft cargo skiff",
"pilots": [],
"films": [
"https://swapi.info/api/films/3"
],
"created": "2014-12-18T10:48:03.208000Z",
"edited": "2014-12-20T21:30:21.688000Z",
"url": "https://swapi.info/api/vehicles/25"
}