/people/24
Request:
fetch("https://swapi.info/api/people/24")
.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": "Bossk",
"height": "190",
"mass": "113",
"hair_color": "none",
"skin_color": "green",
"eye_color": "red",
"birth_year": "53BBY",
"gender": "male",
"homeworld": "https://swapi.info/api/planets/29",
"films": [
"https://swapi.info/api/films/2"
],
"species": [
"https://swapi.info/api/species/7"
],
"vehicles": [],
"starships": [],
"created": "2014-12-15T12:53:49.297000Z",
"edited": "2014-12-20T21:17:50.355000Z",
"url": "https://swapi.info/api/people/24"
}