/people/45
Request:
fetch("https://swapi.info/api/people/45")
.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": "Bib Fortuna",
"height": "180",
"mass": "unknown",
"hair_color": "none",
"skin_color": "pale",
"eye_color": "pink",
"birth_year": "unknown",
"gender": "male",
"homeworld": "https://swapi.info/api/planets/37",
"films": [
"https://swapi.info/api/films/3"
],
"species": [
"https://swapi.info/api/species/15"
],
"vehicles": [],
"starships": [],
"created": "2014-12-20T09:47:02.512000Z",
"edited": "2014-12-20T21:17:50.407000Z",
"url": "https://swapi.info/api/people/45"
}