/people/26
Request:
fetch("https://swapi.info/api/people/26")
.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": "Lobot",
"height": "175",
"mass": "79",
"hair_color": "none",
"skin_color": "light",
"eye_color": "blue",
"birth_year": "37BBY",
"gender": "male",
"homeworld": "https://swapi.info/api/planets/6",
"films": [
"https://swapi.info/api/films/2"
],
"species": [],
"vehicles": [],
"starships": [],
"created": "2014-12-15T13:01:57.178000Z",
"edited": "2014-12-20T21:17:50.359000Z",
"url": "https://swapi.info/api/people/26"
}