/people/7

homecaret-rightpeoplecaret-right

7

API Endpoint:

Request:

fetch("https://swapi.info/api/people/7")
    .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": "Beru Whitesun lars",
  "height": "165",
  "mass": "75",
  "hair_color": "brown",
  "skin_color": "light",
  "eye_color": "blue",
  "birth_year": "47BBY",
  "gender": "female",
  "homeworld": "https://swapi.info/api/planets/1",
  "films": [
    "https://swapi.info/api/films/1",
    "https://swapi.info/api/films/5",
    "https://swapi.info/api/films/6"
  ],
  "species": [],
  "vehicles": [],
  "starships": [],
  "created": "2014-12-10T15:53:41.121000Z",
  "edited": "2014-12-20T21:17:50.319000Z",
  "url": "https://swapi.info/api/people/7"
}
eye-open
Good