/people/22

homecaret-rightpeoplecaret-right

22

API Endpoint:

Request:

fetch("https://swapi.info/api/people/22")
    .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": "Boba Fett",
  "height": "183",
  "mass": "78.2",
  "hair_color": "black",
  "skin_color": "fair",
  "eye_color": "brown",
  "birth_year": "31.5BBY",
  "gender": "male",
  "homeworld": "https://swapi.info/api/planets/10",
  "films": [
    "https://swapi.info/api/films/2",
    "https://swapi.info/api/films/3",
    "https://swapi.info/api/films/5"
  ],
  "species": [],
  "vehicles": [],
  "starships": [
    "https://swapi.info/api/starships/21"
  ],
  "created": "2014-12-15T12:49:32.457000Z",
  "edited": "2014-12-20T21:17:50.349000Z",
  "url": "https://swapi.info/api/people/22"
}
eye-open
Good