'When to use app.get("/",fun(res,req)) and app.post("/",fun(res,req)) in node.js?
I am newbie in backend. I need your help. Actually I am confused between app.get() and app.post(). Also when to use them? So pls give me answer in a simple way with examples.
Thank U in advance...!!!!
Solution 1:[1]
Hi, in API we use
- GET to get data
- POST to add data
- PUT to edit data
- PATCH to edit data
- DELETE to delete data
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kareem Adel |
