diff options
| author | oehhar <harald.oehlmann@elmicron.de> | 2020-11-16 15:03:25 (GMT) |
|---|---|---|
| committer | oehhar <harald.oehlmann@elmicron.de> | 2020-11-16 15:03:25 (GMT) |
| commit | 0566be32d57a7bc95e5b46e7049e37016d1cb13f (patch) | |
| tree | 67a5c1d4fab8b1456ccfcf537bfca9d37c9a9d32 | |
| parent | 0589f3b799a755af312815888840a99a0733e725 (diff) | |
| parent | 45aa98890539609f2fe97681d7bf1a9a8620ae04 (diff) | |
| download | tcl-0566be32d57a7bc95e5b46e7049e37016d1cb13f.zip tcl-0566be32d57a7bc95e5b46e7049e37016d1cb13f.tar.gz tcl-0566be32d57a7bc95e5b46e7049e37016d1cb13f.tar.bz2 | |
Merge documentation changes for http and dict from branch [oehhar-documentation-tickets]
| -rw-r--r-- | doc/dict.n | 2 | ||||
| -rw-r--r-- | doc/http.n | 24 |
2 files changed, 18 insertions, 8 deletions
@@ -58,7 +58,7 @@ of the given patterns (in the style of \fBstring match\fR.) . The script rule tests for matching by assigning the key to the \fIkeyVariable\fR and the value to the \fIvalueVariable\fR, and then evaluating -the given script which should return a boolean value (with the +the given script which should result in a boolean value (with the key/value pair only being included in the result of the \fBdict filter\fR when a true value is returned.) Note that the first argument after the rule selection word is a two-element list. If the @@ -78,6 +78,9 @@ when the transaction completes. For this to work, the Tcl event loop must be active. In Tk applications this is always true. For pure-Tcl applications, the caller can use \fB::http::wait\fR after calling \fB::http::geturl\fR to start the event loop. +.PP +\fBNote:\fR The event queue is even used without the \fB-command\fR option. +As a side effect, arbitrary commands may be processed while \fBhttp::geturl\fR is running. .SH COMMANDS .TP \fB::http::config\fR ?\fIoptions\fR? @@ -316,9 +319,11 @@ otherwise complain about HTTP/1.1. \fB\-query\fR \fIquery\fR . This flag causes \fB::http::geturl\fR to do a POST request that passes the -\fIquery\fR to the server. The \fIquery\fR must be an x-url-encoding -formatted query. The \fB::http::formatQuery\fR procedure can be used to -do the formatting. +\fIquery\fR as payload verbatim to the server. +The content format (and encoding) of \fIquery\fR is announced by the header +field \fBcontent-type\fR set by the option \fB-type\fR. +\fIquery\fR is an x-url-encoding formatted query, if used for html forms. +The \fB::http::formatQuery\fR procedure can be used to do the formatting. .TP \fB\-queryblocksize\fR \fIsize\fR . @@ -542,6 +547,12 @@ is raised, but the status of the transaction will be \fBeof\fR. . The error message will also be stored in the \fBerror\fR status array element, accessible via \fB::http::error\fR. +.TP\fR +.\fBtimeout +A timeout occurred before the transaction could complete +.TP\fR +.\fBreset +user-reset .PP Another error possibility is that \fB::http::geturl\fR is unable to write all the post query data to the server before the server @@ -657,10 +668,9 @@ the post query data to the server. .TP \fBstatus\fR . -Either \fBok\fR, for successful completion, \fBreset\fR for -user-reset, \fBtimeout\fR if a timeout occurred before the transaction -could complete, or \fBerror\fR for an error condition. During the -transaction this value is the empty string. +See description in the chapter \fBERRORS\fR above for a +list and description of \fBstatus\fR. +During the transaction this value is the empty string. .TP \fBtotalsize\fR . |
