summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorsandeep <sandeep>2000-03-19 22:32:25 (GMT)
committersandeep <sandeep>2000-03-19 22:32:25 (GMT)
commit442e6551351a2b2547562fcb091d24518900f248 (patch)
tree13ce9084d6c41a10a178d38efb3ce76757fc4f2d /doc
parent467352f3a6c9e72a15442c938d97adf75c80e247 (diff)
downloadtcl-442e6551351a2b2547562fcb091d24518900f248.zip
tcl-442e6551351a2b2547562fcb091d24518900f248.tar.gz
tcl-442e6551351a2b2547562fcb091d24518900f248.tar.bz2
* library/http2.1/http.tcl: Added -querychannel option and altered
some of Brent's modifications to allow asynchronous posts (via -command). Also modified -queryprogress so that it calls the query callback as <callback> <token> <total size> <current size> to be consistent with -progress. Added -queryblocksize option with default 8192 bytes for post blocksize. Fixed a bunch of potential memory leaks for the case when geturl receives bad args or can't open a socket, etc. Overall, the package really rocks now. * doc/http.n: Added -queryblocksize, -querychannel, and -queryprogress. Also, changed the description of -blocksize, which states that the -progress callback will be called for each block, to now qualify that with an "if -progress is specified". * tests/http.test: Added a querychannel test for synchronous and asynchronous posts, altered the queryprogress test such that the callback conforms to the -progress format. Also, had to use the -queryblocksize option to do the post 16K at a time to match Brent's expected results (and to test that -queryblocksize works).
Diffstat (limited to 'doc')
-rw-r--r--doc/http.n26
1 files changed, 24 insertions, 2 deletions
diff --git a/doc/http.n b/doc/http.n
index 3e750d9..485c8a9 100644
--- a/doc/http.n
+++ b/doc/http.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: http.n,v 1.8 1999/11/19 23:10:17 hobbs Exp $
+'\" RCS: @(#) $Id: http.n,v 1.9 2000/03/19 22:32:25 sandeep Exp $
'\"
.so man.macros
.TH "Http" n 8.3 Tcl "Tcl Built-In Commands"
@@ -129,7 +129,7 @@ At most
\fIsize\fR
bytes are read at once. After each block, a call to the
\fB\-progress\fR
-callback is made.
+callback is made (if that option is specified).
.TP
\fB\-channel\fP \fIname\fP
Copy the URL contents to channel \fIname\fR instead of saving it in
@@ -205,6 +205,28 @@ This flag causes \fB::http::geturl\fR to do a POST request that passes the
formatted query. The \fB::http::formatQuery\fR procedure can be used to
do the formatting.
.TP
+\fB\-queryblocksize\fP \fIsize\fP
+The blocksize used when posting query data to the URL.
+At most
+\fIsize\fR
+bytes are written at once. After each block, a call to the
+\fB\-queryprogress\fR
+callback is made (if that option is specified).
+.TP
+\fB\-querychannel\fP \fIchannelID\fP
+This flag causes \fB::http::geturl\fR to do a POST request that passes the
+data contained in \fIchannelID\fR to the server. The data contained in \fIchannelID\fR must be a x-url-encoding
+formatted query unless the \fB\-type\fP option below is used.
+If a Content-Length header is not specified via the \fB\-headers\fR options,
+\fB::http::geturl\fR attempts to determine the size of the post data
+in order to create that header. If it is
+unable to determine the size, it returns an error.
+.TP
+\fB\-queryprogress\fP \fIcallback\fP
+The \fIcallback\fR is made after each transfer of data to the URL
+(i.e. POST) and acts exactly like the \fB\-progress\fR option (the
+callback format is the same).
+.TP
\fB\-timeout\fP \fImilliseconds\fP
If \fImilliseconds\fR is non-zero, then \fB::http::geturl\fR sets up a timeout
to occur after the specified number of milliseconds.