diff options
author | sandeep <sandeep@noemail.net> | 2000-03-19 22:32:25 (GMT) |
---|---|---|
committer | sandeep <sandeep@noemail.net> | 2000-03-19 22:32:25 (GMT) |
commit | 59d736852dbaa8e246acce0fa47843f9161d11f3 (patch) | |
tree | 13ce9084d6c41a10a178d38efb3ce76757fc4f2d /doc | |
parent | 583d0541a92a8a8d6ec009fe23b6dd329c86f2f8 (diff) | |
download | tcl-59d736852dbaa8e246acce0fa47843f9161d11f3.zip tcl-59d736852dbaa8e246acce0fa47843f9161d11f3.tar.gz tcl-59d736852dbaa8e246acce0fa47843f9161d11f3.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).
FossilOrigin-Name: aadf3c36fecf2456f03b8f5d9fbea4ca969ad267
Diffstat (limited to 'doc')
-rw-r--r-- | doc/http.n | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -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. |