DEV Community

Discussion on: I'm finally making a website!

Collapse
 
jenbutondevto profile image
Jen

Awesome, good luck with it!

For 1. there are different HTTP verbs - the ones that are relevant here are POST and PUT. POST requests usually requires you to submit an entire entity, which doesn't exist - implying that it is new resource. So, if I wanted to add a new lesson, I would POST the payload to /lesson. The response usually returns where the new resource was created.

PUT requests are used for updating a resource, so one that already exists.

Collapse
 
lycho33 profile image
lycho33

Ah I see. I’ve only used PUT/GET/PATCH/DELETE for now but I didn’t know POST was for the whole entity