The first one is the basic fetch to grab any information stored inside the database you want to use.
Let’s break this down 1 line of code at the time.
This is the promise(.then()) and the response that we need to get the data inside the DOM or database where you store your input of data.
This one returns you current data and it’s telling what action must be done for the data that just got pulled. In this case it’s telling the data to show it inside the console for us to check if that is the data we want to manipulate or show inside our webpage.
Now will move on to the next method which is POST
Will now meet the other method PATCH
As you already know most of the codes above the only difference is the patch will update or edit the current data you specifically fetch. In the most common case you look for the id of the data you want to update. Give the information you need inside the body e.g. newId, newName etc.. This should change the old data value a new updated version you just gave it. Again right after all of this is the action you want to do with the method and data.
Now, Now for the HARDEST FETCH OF ALL. DELETE!!!
Well it’s just how you see it you find the data you want to delete with its id preferably to be specifically pointed to that data. The method is delete and it destroys the data from existing inside the DOM.
Thats all now practice and Have Fun Coding!!!