Changeset 12976 in project for wiki/eggref


Ignore:
Timestamp:
01/11/09 01:33:56 (12 years ago)
Author:
sjamaan
Message:

Add documentation about urlencoding procedures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/uri-common

    r12970 r12976  
    2121==== Constructors
    2222
    23 <procedure>(uri-common ARG) => URI-common</procedure>
     23<procedure>(uri-common arg) => uri-common</procedure>
    2424
    2525Construct a new uri-common object. The {{ARG}} can be either an
     
    2828==== Predicates and Accessors
    2929
    30 * <procedure>(uri-common? URI-COMMON) => BOOL</procedure>
    31 * <procedure>(uri-common-generic URI-COMMON) => SYMBOL</procedure>
    32 * <procedure>(uri-common-scheme URI-COMMON) => SYMBOL</procedure>
    33 * <procedure>(uri-common-path URI-COMMON) => LIST</procedure>
    34 * <procedure>(uri-common-query URI-COMMON) => ALIST</procedure>
    35 * <procedure>(uri-common-fragment URI-COMMON) => STRING</procedure>
    36 * <procedure>(uri-common-host URI-COMMON) => STRING</procedure>
    37 * <procedure>(uri-common-port URI-COMMON) => INTEGER</procedure>
    38 * <procedure>(uri-common-username URI-COMMON) => STRING</procedure>
    39 * <procedure>(uri-common-password URI-COMMON) => STRING</procedure>
     30* <procedure>(uri-common? uri-common) => bool</procedure>
     31* <procedure>(uri-common-generic uri-common) => symbol</procedure>
     32* <procedure>(uri-common-scheme uri-common) => symbol</procedure>
     33* <procedure>(uri-common-path uri-common) => list</procedure>
     34* <procedure>(uri-common-query uri-common) => alist</procedure>
     35* <procedure>(uri-common-fragment uri-common) => string</procedure>
     36* <procedure>(uri-common-host uri-common) => string</procedure>
     37* <procedure>(uri-common-port uri-common) => integer</procedure>
     38* <procedure>(uri-common-username uri-common) => string</procedure>
     39* <procedure>(uri-common-password uri-common) => string</procedure>
    4040
    4141If a component is not defined in the given URI-common, then the
     
    4747(ie, it creates a new copy with the modifications).
    4848
     49==== Query encoding and decoding
     50
     51* <parameter>(form-urlencoded-separator [char-set/char/string])</parameter>
     52* <procedure>(form-urlencode alist #!key (separator (form-urlencoded-separator))) => string</procedure>
     53* <procedure>(form-urldecode string #!key (separator (form-urlencoded-separator))) => alist</procedure>
     54
     55Encode or decode an alist using the encoding corresponding to the
     56[[http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1|form-urlencoded]]
     57media type, using the given separator character(s).
     58
     59When encoding, if {{separator}} is a string, the first character will
     60be used as the separator in the resulting querystring.  If it is a
     61char-set, it will be converted to a string and its first character
     62will be taken.  In either case, all of these characters are encoded if
     63they occur inside the key/value pairs.
     64
     65When decoding, any character in the set (or string) will be seen as
     66a separator.
     67
     68The separator defaults to the ampersand character.
    4969
    5070=== Requires
Note: See TracChangeset for help on using the changeset viewer.