Changeset 8465 in project


Ignore:
Timestamp:
02/14/08 15:53:55 (12 years ago)
Author:
elf
Message:

Changes applied for elf (66.92.69.84) through svnwiki:

still trying to make formatting work correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/http

    r8464 r8465  
    6868
    6969Sends a '''POST''' request represented by {{REQUEST}}, which may be a string (URL)
    70 or a HTTP request object, and returns a string containing the body of the servers response.
     70or a HTTP request object, and returns a string containing the body of the server response.
    7171{{ARGUMENTS}} may be one of several forms depending on the value of the {{Content-Type}} attribute. If {{ARGUMENTS}} is unspecified, the body will be blank (i.e., a headers-only request).
    7272{{DELIM}} is an arbitrary separator string defaulting to the null-string.  The behaviour of {{DELIM}} is dependent on {{Content-Type}}.
     
    7474{{CTYPE}} is the {{Content-Type}} header attribute, and defaults to {{application/x-www-form-urlencoded}}.  {{http:POST}} has special handlers for several values of {{Content-Type}} to simplify creation of the body, as given below:
    7575
    76 <table>
    77 <tr><th>Content-Type</th><th>Handler</th></tr>
    78 <tr><td>{{application/x-www-form-urlencoded}}</td>
    79 <td>{{ARGUMENTS}} may be a string or a list.  The list may contain either {{(NAME . VALUE)}} pairs or strings of the form {{"name=value"}}.  The message body is generated as {{"name1=val1&name2=val2..."}}.  {{DELIM}} is ignored.</td></tr>
    80 <tr><td>{{multipart/form-data}}</td>
    81 <td>{{ARGUMENTS}} may be a string or a list.  {{DELIM}} is used as the boundary string, if given.  If {{DELIM}} is not specified, it defaults
    82 to {{----chicken-scheme---}}.  The {{Content-Type}} header is automatically annotated with the boundary metadata.  Each bounded part is generated, including the whitespace separators.  The {{ARGUMENTS}} list must be composed of elements of the following types, where each element of the top-level list is a separate multipart:
    8376<scheme>
    84 (display "<table><tr><td><tt>NAME</tt></td><td>name attrib of this part is set to <tt>NAME</tt>.  Body is empty.</td></tr>")
    85 (display "<tr><td><tt>(NAME . VALUE)</tt></td><td>name attrib of this part is <tt>NAME</tt>.  Body is <tt>{VALUE</tt>.</td></tr>")
    86 (display "<tr><td><tt>(NAME (ATTRIB . AVAL)... VALUE)</tt></td><td>name attrib of this part is <tt>NAME</tt>.  Every following <tt>(ATTRIB . AVAL)</tt> pair is added to the part header as <tt>ATTRIB=\"AVAL\"</tt> and separated with semicolons.  If <tt>ATTRIB</tt> ends with a colon, it is whitespace separated and added to the body to allow file-type transmission headers.  <tt>VALUE</tt> is added to the body after all attribs  are processed, and must NOT be a pair.</td></tr>")
    87 (display "</table>")
     77(display "<table>")
     78(display "<tr><th><tt>Content-Type</tt></th><th>Handler</th></tr>")
     79(display "<tr><td><tt>application/x-www-form-urlencoded</tt></td>")
     80(display "<td><tt>ARGUMENTS</tt> may be a string or a list. The list may ")
     81(display "contain either <tt>(NAME . VALUE)</tt> pairs or strings of the ") (display "form <tt>\"name=value\"</tt>.  The message body is generated ")
     82(display "as <tt>\"name1=val1&amp;name2=val2...\"</tt>.  <tt>DELIM</tt> ")
     83(display "is ignored.</td></tr>")
     84(display "<tr><td><tt>multipart/form-data</tt></td>")
     85(display "<td><p><tt>ARGUMENTS</tt> may be a string or a list.  ")
     86(display "<tt>DELIM</tt> is used as the boundary between multipart ")
     87(display "sections, or defaults to <tt>----chicken-scheme----</tt> ")
     88(display "if absent.  <tt>DELIM</tt> is automatically added to the ")
     89(display "<tt>Content-Type</tt> header as the value of the ")
     90(display "<tt>boundary</tt> attribute.  Each element of the ")
     91(display "<tt>ARGUMENTS</tt> top-level list generates a single multipart ")
     92(display "segment, and must be composed of elements of the following ")
     93(display "types:\n")
     94(display "<table><tr><td><tt>NAME</tt></td>")
     95(display "<td>name attribute set to <tt>NAME</tt>.  Body is empty.")
     96(display "</td></tr>")
     97(display "<tr><td><tt>(NAME . VALUE)</tt></td>")
     98(display "<td>name attribute set to <tt>NAME</tt>.  Body set to ")
     99(display "<tt>VALUE</tt>.</td></tr>")
     100(display "<tr><td><tt>(NAME (ATTRIB . AVAL)... VALUE)</tt></td>")
     101(display "<td>name attribute set to <tt>NAME</tt>.  Every ")
     102(display "<tt>(ATTRIB . AVAL)</tt> pair is added to the segment header ")
     103(display "as <tt>ATTRIB=\"AVAL\"</tt>, separated by semicolons.  If ")
     104(display "<tt>ATTRIB</tt> ends with a colon, it is added to the body ")
     105(display "to allow metadata for file transmission.  <tt>VALUE</tt> ")
     106(display "is appended to the body after attributes are processed, and ")
     107(display "must NOT be a pair.</td></tr></table></p></td></tr>")
     108(display "<tr><td>everything else</td>")
     109(display "<td><tt>ARGUMENTS</tt> may be a string or a list of strings.  ")
     110(display "Lists of strings are concatenated with <tt>DELIM</tt> as a ")
     111(display "separator.</td></tr></table>")
    88112</scheme>
    89 </td></tr>
    90 <tr><td>everything else</td>
    91 <td>{{ARGUMENTS}} may be either a string or a list of strings.  Lists of strings are concatenated with {{DELIM}} as a separator.</td></tr>
    92 </table>
    93113
    94114The above alterations are performed only when {{ARGUMENTS}} is a list.  If given as a string, the body is set to the string value without any alteration.  All values other than strings or lists generate an error.
Note: See TracChangeset for help on using the changeset viewer.