/people/34
Request:
fetch("https://swapi.info/api/people/34")
.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": "Finis Valorum",
"height": "170",
"mass": "unknown",
"hair_color": "blond",
"skin_color": "fair",
"eye_color": "blue",
"birth_year": "91BBY",
"gender": "male",
"homeworld": "https://swapi.info/api/planets/9",
"films": [
"https://swapi.info/api/films/4"
],
"species": [],
"vehicles": [],
"starships": [],
"created": "2014-12-19T17:21:45.915000Z",
"edited": "2014-12-20T21:17:50.379000Z",
"url": "https://swapi.info/api/people/34"
}