OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Matt Sergeant (msergeant_at_startechgroup.co.uk)
Date: Thu Jul 11 2002 - 04:05:53 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Steven Fling wrote:
    > Our application communicates across various application server
    > environments via HTTP/HTTPS requests (versus RMI, etc.) and needs to
    > pass data/parameters back and forth. Naturally we use SSL to encrypt
    > the request/response.
    >
    > I wanted to see if there were any Best Practices established to
    > transfer data in this fashion. POST vs. GET method, querystring vs.
    > hidden form variable, etc.

    It's good to see so few people answering your question ;-)

    The basic answer is that you should use GET when you need the result to
    be cached - for example search results that will remain constant for a
    certain period of time. And you should use POST when your request
    modifies some internal state in your application.

    The basic premise behind all of this is the REST application
    architecture, which in basic terms is the web we use every day. You can
    find lots of details on REST at
    http://internet.conveyor.com/RESTwiki/moin.cgi

    and two good articles on it on XML.com, at:
    http://www.xml.com/pub/a/2002/02/06/rest.html and
    http://www.xml.com/pub/a/2002/02/20/rest.html (note that while the
    articles are on XML.com, this doesn't mean you have to use XML as your
    serialisation format - there are people using REST with form encoding,
    and some even using it with MIME encoding).

    Matt.