GithubHelp home page GithubHelp logo

tfulanchan / making-an-async-post-request Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3 KB

https://www.codecademy.com/courses/learn-intermediate-javascript/lessons/js-requests-with-fetch-api/exercises/making-an-async-post-request

JavaScript 100.00%

making-an-async-post-request's Introduction

making-an-async-post-request

https://www.codecademy.com/courses/learn-intermediate-javascript/lessons/js-requests-with-fetch-api/exercises/making-an-async-post-request

REQUESTS WITH FETCH API Review In this lesson, we learned how to make GET and POST requests using the Fetch API and async/await keywords. Let’s recap on the concepts covered in the previous exercises:

GET and POST requests can be created in a variety of ways. We can use fetch() and async/await to asynchronous request data from APIs. Promises are a type of JavaScript object that represents data that will eventually be returned from a request. The fetch() function can be used to create requests and will return promises. We can chain .then() methods to handle promises returned by the fetch() function. The async keyword is used to create asynchronous functions that will return promises. The await keyword can only be used with functions declared with the async keyword. The await keyword suspends the program while waiting for a promise to resolve. Congratulations on learning all about asynchronous requests using fetch(), async, and await! These concepts are fundamental to helping you develop more robust web apps!

Instructions Play around with the browser and code to make GET and POST requests. To make POST requests to the Rebrandly API, make sure you assign apiKey your Rebrandly API key and run the code!

If you want to challenge yourself:

Rewrite the requests from scratch. Replace the helper functions (renderResponse() in public/helperFunctions.js) with your own code. Use different APIs to make GET/POST requests using async/await.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.