Two kind of request.
GET and POST
GET | POST |
---|---|
get data | post data |
www.abc.com/?greeting=hello | parameters in the body |
has max length | no max length |
can be cached or bookmarked | not cached or bookmarked |
don't change server state | post, update, delete data |
GET request:
1. request/start-line (GET/path to resource/HTTP 1.1)
2. header
3. body
response:
1. status-line (HTTP 1.0 200 OK)
2. header
3. body
some response codes:
1. 2XX - ok
2. 3XX - redirected (eg. 302)
3. 4XX - client errors (eg. 404 URI not found)
4. 5XX - server errors (eg. 505 http version not supported)
No comments:
Post a Comment