/vehicles/6
Request:
fetch("https://swapi.info/api/vehicles/6")
.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": "T-16 skyhopper",
"model": "T-16 skyhopper",
"manufacturer": "Incom Corporation",
"cost_in_credits": "14500",
"length": "10.4 ",
"max_atmosphering_speed": "1200",
"crew": "1",
"passengers": "1",
"cargo_capacity": "50",
"consumables": "0",
"vehicle_class": "repulsorcraft",
"pilots": [],
"films": [
"https://swapi.info/api/films/1"
],
"created": "2014-12-10T16:01:52.434000Z",
"edited": "2014-12-20T21:30:21.665000Z",
"url": "https://swapi.info/api/vehicles/6"
}