Create a Promise Chain in JavaScript with Promise.prototype.then()

InstructorMarius Schulz

Share this video with your friends

Send Tweet

This lesson introduces the native JavaScript Promise object and the Promise.prototype.then() method. We’re gonna look at how to make an HTTP request using the Fetch API and how to asynchronously process the response in a promise chain.

In addition, we'll discuss the three mutually exclusive states a promise can be in: pending, fulfilled, or rejected.

Vimal Kumar
~ 5 years ago

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://starwars.egghead.training/films. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)

Carlos Santín
~ 3 years ago

Current start wars API is no longer working :/

Marius Schulzinstructor
~ 3 years ago

@Carlos: Apologies for the inconveniences. The API should be back up and running!

antonin
~ a year ago

API still not working.

Antistatique Dev
~ 2 months ago

The current API used in videos is down. You can use this one if you want to reproduce the tutorial. You will need to make some changes in the code but it's better than no API ! https://swapi.dev/api/films/1/