in reply to Post vs. Get

Neither will use enough to matter. I can make a case both ways and would be that it varies more between servers than it does between cases. POST sends a little more data but putting the data in a header eases the burden of parsing the data. POST creates a buffer for the STDIN pipe but GET burdens the Environment of the shell.

My advice? Spare your users the ugly URLs and use POST. If that advice falls on deaf ears, then I recommend you use the one you are more comfortable with. Your time is more valuable than 10 times the server resources you would ever save.

And if you use Perl, for goodness sakes use CGI; is your friend. Then you can use either and it will work just the same. (well, unless you move more than 8 or 16 KB of data or need file uploads, then POST is your only rational choice.)

--
$you = new YOU;
honk() if $you->love(perl)

Replies are listed 'Best First'.
Re: Re: Post vs. Get
by tomhukins (Curate) on Feb 21, 2001 at 15:03 UTC
    Whether you use GET or POST depends on what you're doing. See section 9.1.1 (Safe Methods) of RFC 2616.

    In brief, if submission of the form causes something to change, use POST. If you're just returning some customised information according to the query (like a search engine), use GET.

Re: Gleaning POST or GET
by davemabe (Monk) on Feb 21, 2001 at 18:57 UTC
    Can you use CGI.pm to tell whether a parameter was POSTed or GETed? I have seen web sites do this and am just curious.

    Dave
      CGI.pm has request_method() which can be used for this.

      If you're just using plain CGI, $ENV{'REQUEST_METHOD'} tells you the same thing.