home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / spyce / *.* / request.spy < prev    next >
Encoding:
Text File  |  2004-05-18  |  1.0 KB  |  36 lines

  1. <html><body>
  2.   Using the Spyce request object, we can obtain 
  3.   information sent along with the request. The 
  4.   table below shows some request methods and their 
  5.   return values. Use the form below to post form 
  6.   data via GET or POST. <br>
  7.   <hr>
  8.   [[-- input forms --]]
  9.   <form action="[[=request.uri('path')]]" method=get>
  10.     get: <input type=text name=name>
  11.     <input type=submit value=ok>
  12.   </form>
  13.   <form action="[[=request.uri('path')]]" method=post>
  14.     post: <input type=text name=name>
  15.     <input type=submit value=ok>
  16.   </form>
  17.   <hr>
  18.   [[-- tabulate response information --]]
  19.   <table border=1>
  20.     <tr>
  21.       <td><b>Method</b></td>
  22.       <td><b>Return value</b></td>
  23.     </tr>
  24.     [[ for method in ['uri()', 'uri("path")',
  25.       'uri("query")', 'method()','query()',
  26.       'get()','get1()', 'post()','post1()',
  27.       'getHeader()','env()', 'filename()']: { 
  28.     ]]
  29.       <tr>
  30.         <td valign=top>request.[[=method]]</td>
  31.         <td>[[=eval('request.%s' % method)]]</td>
  32.       </tr>
  33.     [[ } ]]
  34.   </table>
  35. </body></html>
  36.