/people/30
Request:
fetch("https://swapi.info/api/people/30")
.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": "Wicket Systri Warrick",
"height": "88",
"mass": "20",
"hair_color": "brown",
"skin_color": "brown",
"eye_color": "brown",
"birth_year": "8BBY",
"gender": "male",
"homeworld": "https://swapi.info/api/planets/7",
"films": [
"https://swapi.info/api/films/3"
],
"species": [
"https://swapi.info/api/species/9"
],
"vehicles": [],
"starships": [],
"created": "2014-12-18T11:21:58.954000Z",
"edited": "2014-12-20T21:17:50.369000Z",
"url": "https://swapi.info/api/people/30"
}