Changes between Version 1 and Version 2 of doc/developer/WiFiDogProtocol_V2

Show
Ignore:
Timestamp:
03/25/08 17:38:11 (14 years ago)
Author:
acv@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/developer/WiFiDogProtocol_V2

    v1 v2  
    2222Some of the requirements above do not lend itself well to a RESTFull Resource oriented architecture (ROA).  However, keeping the current format (GET parameters) limit us, in practice, to a single list of tag-value pairs.  Even if one could, in theory, put an action=whatever in the middle of the list and have the protocol decree that every following parameters (until the next action) is to be a parameter of that action, that would utterly confuse most web servers and frameworks. 
    2323 
     24One other possibility is to borrow a page from the way PHP does URL-parsing. Setting the key part of the get request to a array representation would allow for fairly logical request bundling., I.e.: 
     25 
     26{{{ 
     27/page?req[0][action]=Action1&req[0][Param1]=param&req[0][Param...]=param...&req[0][Paramn]=paramn&\ 
     28req[...][action]=Action...&req[...][Param1]=param&req[...][Param...]=param...&req[...][Paramn]=paramn&\ 
     29req[n][action]=Actionn&req[n][Param1]=param&req[n][Param...]=param...&req[n][Paramn]=paramn 
     30}}} 
     31 
     32This format would remain human readable while being very simple to parse (free in PHP, trivial in other languages). 
     33 
    2434So POSTing the parameters may have to be considered, in which case the same format as the response should be used, for obvious reasons.  
    2535