Kelvin Chen5,152 Points
How does the server know the request HTTP verb
The video explains that making request from Postman with PUT or POST requests. But if I am making the PUT or POST request from the browser with the same routing, how does the server know what kind of request I am making? And how do I send a JSON object with my requests in the browser?
Zimri Leijen6,636 Points
Express abstracts those things away, but whenever you make a request to the server, a lot of data is sent, along with that data is a header, which contains information like the type of request ('PUT', 'GET', etc..).
By default, a request is a 'GET' request, but when you make an interactive element on a website (usually a form or a button) you can specify the type of request being sent.
A form is often a 'POST' request for example (but not always).
I believe this course gives a bit more insight into it.