/people/9

homecaret-rightpeoplecaret-right

9

API Endpoint:

Request:

fetch("https://swapi.info/api/people/9")
    .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": "Biggs Darklighter",
  "height": "183",
  "mass": "84",
  "hair_color": "black",
  "skin_color": "light",
  "eye_color": "brown",
  "birth_year": "24BBY",
  "gender": "male",
  "homeworld": "https://swapi.info/api/planets/1",
  "films": [
    "https://swapi.info/api/films/1"
  ],
  "species": [],
  "vehicles": [],
  "starships": [
    "https://swapi.info/api/starships/12"
  ],
  "created": "2014-12-10T15:59:50.509000Z",
  "edited": "2014-12-20T21:17:50.323000Z",
  "url": "https://swapi.info/api/people/9"
}
eye-open
Good