/people/23
Request:
fetch("https://swapi.info/api/people/23")
.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": "IG-88",
"height": "200",
"mass": "140",
"hair_color": "none",
"skin_color": "metal",
"eye_color": "red",
"birth_year": "15BBY",
"gender": "none",
"homeworld": "https://swapi.info/api/planets/28",
"films": [
"https://swapi.info/api/films/2"
],
"species": [
"https://swapi.info/api/species/2"
],
"vehicles": [],
"starships": [],
"created": "2014-12-15T12:51:10.076000Z",
"edited": "2014-12-20T21:17:50.351000Z",
"url": "https://swapi.info/api/people/23"
}