/people/43
Request:
fetch("https://swapi.info/api/people/43")
.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": "Shmi Skywalker",
"height": "163",
"mass": "unknown",
"hair_color": "black",
"skin_color": "fair",
"eye_color": "brown",
"birth_year": "72BBY",
"gender": "female",
"homeworld": "https://swapi.info/api/planets/1",
"films": [
"https://swapi.info/api/films/4",
"https://swapi.info/api/films/5"
],
"species": [],
"vehicles": [],
"starships": [],
"created": "2014-12-19T17:57:41.191000Z",
"edited": "2014-12-20T21:17:50.401000Z",
"url": "https://swapi.info/api/people/43"
}