The two basic forms of
request are GET and POST. Both are requests of the server, but the POST allows the client to enclose data in
the body of its request. The server replies with an HTTP RESPONSE.
The GET request is simply a request for information. Usually a GET is for information on a web page, but
it can also be for a file, such as a download of a program the user is interested in using. A GET request is usually
a single line, and might look like this:
GET /pub/www/TheProject.html HTTP/1.0
or:
GET http://www.w3.org/pub/www/TheProject.html HTTP/1.0
The RESPONSE will include a status line and the data requested. The RESPONSE might look like this:
HTTP/1.0 200 OK
Project Home Page[content of the web page, marked with HTML tags--see below]
When the client must provide data in order for the server to perform the requested action, the client uses
a POST request. The POST protocol provides for the data to be contained in the body of the POST request.
A POST request providing Carl for field fn and Reynolds for field ln might look like this:
POST /servelet/SomePhoneBook HTTP/1.0
Content-Length: 19
Content-Type: application/x-www-form-urlencoded
fn=Carl&ln=Reynolds
The simplicity of the WWW protocol is one of the reasons for its success.
Pages:
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377