/people/57
Request:
fetch("https://swapi.info/api/people/57")
.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": "Yarael Poof",
"height": "264",
"mass": "unknown",
"hair_color": "none",
"skin_color": "white",
"eye_color": "yellow",
"birth_year": "unknown",
"gender": "male",
"homeworld": "https://swapi.info/api/planets/48",
"films": [
"https://swapi.info/api/films/4"
],
"species": [
"https://swapi.info/api/species/25"
],
"vehicles": [],
"starships": [],
"created": "2014-12-20T10:34:48.725000Z",
"edited": "2014-12-20T21:17:50.437000Z",
"url": "https://swapi.info/api/people/57"
}