/people/19
Request:
fetch("https://swapi.info/api/people/19")
.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": "Jek Tono Porkins",
"height": "180",
"mass": "110",
"hair_color": "brown",
"skin_color": "fair",
"eye_color": "blue",
"birth_year": "unknown",
"gender": "male",
"homeworld": "https://swapi.info/api/planets/26",
"films": [
"https://swapi.info/api/films/1"
],
"species": [],
"vehicles": [],
"starships": [
"https://swapi.info/api/starships/12"
],
"created": "2014-12-12T11:16:56.569000Z",
"edited": "2014-12-20T21:17:50.343000Z",
"url": "https://swapi.info/api/people/19"
}