According to Majeau, Benoit:
> 
> I know I may look like a rookie but what is the difference between "POST"
> and "GET"?
> 

Basically, GET is the main method by which your browser requests information
from an HTTP server.  E.g., to load a web page like

        http://www.scrc.umanitoba.ca/search.html

your browser would connect to port 80 on www.scrc.umanitoba.ca, and send
the request:

        GET /search.html HTTP/1.0

followed by some other header lines.  If the search form uses the GET
method, then when you press the submit button (i.e. "Search" button),
your browser sends this request:

        GET 
/cgi-bin/htsearch?config=htdig&restrict=&exclude=&method=and&format=builtin-long&words=my+search+keywords
 HTTP/1.0

But if the search form uses the POST method, your browser would use:

        POST /cgi-bin/htsearch

and all of the query string (config=...) would follow separately, after the
other headers.  POST is more appropriate if the form may contain a lot of
input, or input you don't want in the HTTP server logs or browser's URL
window (e.g. passwords).  I use the GET method for htsearch, because I like
having the search requests in the server logs, so I can get summaries of them
without having to do separate search logging.

Depending on how one's HTTP server is configured (or misconfigured),
it may handle GET and POST differently, and impose restrictions on POST.
Check your server settings if you want to use POST, and can't.

If you want to know more about how HTTP GET requests are put together, you
may want to have a look at Document::RetrieveHTTP() in htdig/Document.cc.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the body of the message.

Reply via email to