Changeset 8464 in project


Ignore:
Timestamp:
02/14/08 14:44:10 (12 years ago)
Author:
elf
Message:

Changes applied for elf (66.92.69.84) through svnwiki:

doc fix attempt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/http

    r8463 r8464  
    6767 [procedure] (http:POST REQUEST [ARGUMENTS] #!key [headers: LIST] [type: CTYPE] [delim: DELIM])
    6868
    69 Sends a ''POST'' request represented by {{REQUEST}}, which may be a string (an URL)
     69Sends a '''POST''' request represented by {{REQUEST}}, which may be a string (URL)
    7070or a HTTP request object, and returns a string containing the body of the servers 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}}.
    7373{{HEADERS}} should be either null or a list composed of {{(ATTRIBUTE . VALUE)}} pairs.  {{Connection}} and {{Content-Type}}, if unspecified, will be added automatically.  Attributes are not case sensitive.  Any attributes explicitly given in {{HEADERS}} are used, even if normally autogenerated. 
    74 {{CTYPE}} is the {{Content-Type}} header attribute, and defaults to {{application/x-www-form-urlencoded}}.  {{http:POST}} knows several values of {{Content-Type}} and will create the body appropriately, as given below:
     74{{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
    7676<table>
     
    7979<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>
    8080<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 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:
    82 
    83 <table>
    84 <tr><td>{{NAME}}</td><td>name attrib of this part is set to {{NAME}}.  Body is empty.</td></tr>
    85 <tr><td>{{(NAME . VALUE)}}</td><td>name attrib of this part is {{NAME}}.  Body is {{VALUE}}.</td></tr>
    86 <tr><td>{{(NAME (ATTRIB . AVAL)... VALUE)}}</td><td>name attrib of this part is {{NAME}}.  Every following {{(ATTRIB . AVAL)}} pair is added to the part header as {{ATTRIB="AVAL"}} and separated with semicolons.  If {{ATTRIB}} ends with a colon, it is whitespace separated and added to the body to allow file transmission headers.  {{VALUE}} is added to the body after all attribs  are processed, and must NOT be a pair.</td></tr>
    87 </table>
     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
     82to {{----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:
     83<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>")
     88</scheme>
    8889</td></tr>
    8990<tr><td>everything else</td>
Note: See TracChangeset for help on using the changeset viewer.