🌐HTTP Method
Also known as HTTP Verb, Request Method
The first word of a web request. It says what to do, like GET.
Think of it like
Think of it like the verb in a note. Get this, add this, change this or remove this.
Example
Lucy's app sends GET to load a profile and PATCH to change one field in it. Same address, two different methods.
Why it matters
The right method tells servers and caches what is safe to repeat. It also shows what changes data.
Definition
Example code
http
GET /api/users/42 HTTP/1.1
Host: example.comCommon mistake
Key takeaways
- 1The verb of a request. Read, add, change or remove.
- 2Read first. The server checks it before anything.
- 3Some are safe. GET changes nothing.