Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 93ac3e9c83cc61e19e0d91f0bc547f79f4d8087283b642a2e450766f78ea1131
Ticket: 4f511270af7eb2bf02e4bf5db477f243eec9c69d
http documentation: -query data may be any data
User & Date: oehhar on 2020-09-02 16:06:05
Changes

  1. comment changed to:
    The http::geturl command option "-query" has the following description:
    
    <verbatim>
    -query query
        This flag causes ::http::geturl to do a POST request that passes the query to the server.
        The query must be an x-url-encoding formatted query.
        The ::http::formatQuery procedure can be used to do the formatting. 
    </verbatim>
    
    IMHO the query data may be arbitrary data. Only if the -type parameter has the default value "application/x-www-form-urlencoded", it is required to be encoded as "x-url-encoding formatted".
    
    If one wants to send for example binary picture data, one may use:
    
    <verbatim>
    http::geturl $URL -query $JPegPictureData -type image/jpeg
    </verbatim>
    
    AFAIK this works well with the http package.
    
    In addition, the subject encoding/charset is not addressed.
    
    A proposed alternate wording would be:
    
    <verbatim>
    -query query
        This flag causes ::http::geturl to do a POST request that passes the _query_ as payload verbatim to the server.
        The content format (and encoding) of _query_ is announced by the header field 'content-type' set by the -type option.
    
        _query_ is an x-url-encoding formatted query, if used for html forms.
        The ::http::formatQuery procedure may be used to do the formatting. 
    </verbatim>
    
    Thank you,
    Harald
    
  2. login: "oehhar"
  3. mimetype: "text/plain"