The first type of requests we’re going to tackle are GET requests using fetch()

The fetch() function:

  • Creates a request object that contains relevant information that an API needs.
  • Sends that request object to the API endpoint provided.
  • Returns a promise that ultimately resolves to a response object, which contains the status of the promise with information the API sent back.

In the next exercise we’ll go over the boilerplate code for using fetch() and walk through what each step does!


Move on to the next exercise when you’re ready!

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?