/constructor_project

Javascript constructor practice project

Primary LanguageJavaScript

API CALLS CRUD CONSTRUCTOR

Javascript constructor practice project Class Topic : API calls | Async | Await clear clear await

            method to get some users.
            // syncronous approach.
            const users =  await getUsers();
            // async approach
            getUsers().then(callback);
            // here callback is responsible to handle the result when data is back.

async someFunction(){ await something. this line won't get executed until await is done. } callAnotherFunction() someFunction() callAnotherFunction()

Practice in class : Practicing constructors Homework : Finalize Homeworks

// to get some data you use API calls. // to create some data you use API calls. - Q: what HTTP verb do you use for this? A: POST // to read some data you use API calls. - Q: what HTTP verb do you use for this? A: GET // to update some data you use API calls. - Q: what HTTP verb do you use for this? A: PUT // to delete some data you use API calls. - Q: what HTTP verb do you use for this? A: DELETE Speed of you api calls.

// What handles API calls?

  • Server Side. any computer which it's api is accessible to public. AWS has those big buildings with computer boxes. with no monitor, keyboard. CMD, Terminal.
  • Backend.
    • any program that is written using server side languages. (node.js, python, c#, Java)