> From: "Hans Boldt" <boldt@ca.ibm.com>
> What's the difference between using GET and POST?
> Generally, POST should be used when you're changing
> state on the server, and GET should be used when you're
> retrieving data from the server.  Indeed, a CGI app can
> have a different effect based on the request method.

Good point, Hans.  Your point may also be relevant to the level of
abstraction provided by your Web API of choice.  With too much abstraction,
the program may not even be able to determine the request method, for
example.

For what it's worth, I took a middle-ground approach with Relational-Web.
While the Web request is always automatically parsed, I provided separate
procedures for "form" variables, "query string" parameters, and
"environment" variables.  With each procedure you just pass the name of the
variable that you want to reference.  For example:

Eval myVariable = frmFldVal(myFormFieldName)

and

Eval myVariable = qryVarVal(myQueryStringParameterName)

and

Eval myVariable = envVarVal(myEnvironmentVariableName)

Taking a middle-ground approach provides enough abstraction to cover most
situations, and allows the programmer to wrap my APIs with higher-level
procedures of their own, if they choose.

So a change in the request method from POST to GET would normally require
the frmFldVal() call to be replace with qryVarVal() call.  But it would also
be trivial for the programmer to write a generic procedure such as
getVariable() which would provide a wrapper around both frmVarVal() and
qryVarVal().

Nathan M. Andelin
www.relational-data.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.