summaryrefslogtreecommitdiffstats
path: root/doc/http.n
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2022-09-12 17:33:50 (GMT)
committerkjnash <k.j.nash@usa.net>2022-09-12 17:33:50 (GMT)
commit83b951fbc6b973b4d850c1293cd82559a9c96228 (patch)
tree43261ca6d797d7cbe426dd811b0a9e585c912c58 /doc/http.n
parenta194e805e604396e9ad9a39a4e7c569334b2d35c (diff)
downloadtcl-83b951fbc6b973b4d850c1293cd82559a9c96228.zip
tcl-83b951fbc6b973b4d850c1293cd82559a9c96228.tar.gz
tcl-83b951fbc6b973b4d850c1293cd82559a9c96228.tar.bz2
Rearrange groups of lines in http.n without other changes to content.
Diffstat (limited to 'doc/http.n')
-rw-r--r--doc/http.n148
1 files changed, 74 insertions, 74 deletions
diff --git a/doc/http.n b/doc/http.n
index 5a7009e..dcd65ae 100644
--- a/doc/http.n
+++ b/doc/http.n
@@ -32,11 +32,9 @@ http \- Client-side implementation of the HTTP/1.1 protocol
.sp
\fB::http::size \fItoken\fR
.sp
-\fB::http::responseLine\fR \fItoken\fR
-.sp
-\fB::http::responseCode\fR \fItoken\fR
+\fB::http::error \fItoken\fR
.sp
-\fB::http::reason \fIcode\fR
+\fB::http::cleanup \fItoken\fR
.sp
\fB::http::requestLine\fR \fItoken\fR
.sp
@@ -44,16 +42,18 @@ http \- Client-side implementation of the HTTP/1.1 protocol
.sp
\fB::http::requestHeaderValue\fR \fItoken\fR \fIheaderName\fR
.sp
+\fB::http::responseLine\fR \fItoken\fR
+.sp
+\fB::http::responseCode\fR \fItoken\fR
+.sp
+\fB::http::reason \fIcode\fR
+.sp
\fB::http::responseHeaders\fR \fItoken\fR ?\fIheaderName\fR?
.sp
\fB::http::responseHeaderValue\fR \fItoken\fR \fIheaderName\fR
.sp
\fB::http::responseBody\fR \fItoken\fR
.sp
-\fB::http::error \fItoken\fR
-.sp
-\fB::http::cleanup \fItoken\fR
-.sp
\fB::http::register \fIproto port command\fR
.sp
\fB::http::registerError \fIport\fR ?\fImessage\fR?
@@ -509,28 +509,69 @@ because in this case the \fB::http::geturl\fR call does not return
until the HTTP transaction is complete, and thus there is nothing to
wait for.
.TP
-\fB::http::responseBody\fR \fItoken\fR
+\fB::http::status\fR \fItoken\fR
.
-This command returns the entity sent by the HTTP server (unless
-\fI-channel\fR was used, in which case the entity was delivered to the
-channel, and the command returns the empty string).
-.RS
-.PP
-Other terms for
-"entity", with varying precision, include "representation of resource",
-"resource", "response body after decoding", "payload",
-"message body after decoding", "content", and "file".
-.RE
+This is a convenience procedure that returns the \fBstatus\fR element of
+the state array.
+.TP
+\fB::http::size\fR \fItoken\fR
+.
+This is a convenience procedure that returns the \fBcurrentsize\fR
+element of the state array, which represents the number of bytes
+received from the URL in the \fB::http::geturl\fR call.
.TP
\fB::http::error\fR \fItoken\fR
.
This is a convenience procedure that returns the \fBerror\fR element
of the state array.
.TP
-\fB::http::status\fR \fItoken\fR
+\fB::http::cleanup\fR \fItoken\fR
.
-This is a convenience procedure that returns the \fBstatus\fR element of
-the state array.
+This procedure cleans up the state associated with the connection
+identified by \fItoken\fR. After this call, the procedures
+like \fB::http::data\fR cannot be used to get information
+about the operation. It is \fIstrongly\fR recommended that you call
+this function after you are done with a given HTTP request. Not doing
+so will result in memory not being freed, and if your app calls
+\fB::http::geturl\fR enough times, the memory leak could cause a
+performance hit...or worse.
+.TP
+\fB::http::requestLine\fR \fItoken\fR
+.
+This command returns the "request line" sent to the server.
+The "request line" is the first line of a HTTP client request, and has three
+elements separated by spaces: the HTTP method, the URL relative to the server,
+and the HTTP version. Examples:
+.PP
+.DS
+.RS
+GET / HTTP/1.1
+GET /introduction.html?subject=plumbing HTTP/1.1
+POST /forms/order.html HTTP/1.1
+.RE
+.DE
+.TP
+\fB::http::requestHeaders\fR \fItoken\fR ?\fIheaderName\fR?
+.
+This command returns a list of the HTTP request header names and values, in the
+order that they were sent to the server: a Tcl list of the form
+?name value ...? Header names are case-insensitive and are converted to lower
+case. The return value is not a \fBdict\fR because some header names may occur
+more than once. If one argument is supplied, all request headers
+are returned: the value is that of the \fBrequestHeaders\fR element
+of the state array (described below). If two arguments are supplied, the
+second provides the value of a header name. Only headers with the requested
+name (converted to lower case) are returned. If no such headers are found,
+an empty list is returned.
+.TP
+\fB::http::requestHeaderValue\fR \fItoken\fR \fIheaderName\fR
+.
+This command returns the value of the HTTP request header named
+\fIheaderName\fR. Header names are case-insensitive and are converted to
+lower case. If no such header exists, the return value is the empty string.
+If there are multiple headers named \fIheaderName\fR, the result is obtained
+by joining the individual values with the string ", " (comma and space),
+preserving their order.
.TP
\fB::http::responseLine\fR \fItoken\fR
.
@@ -590,49 +631,6 @@ A registry of valid status codes is maintained at
https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
.RE
.TP
-\fB::http::size\fR \fItoken\fR
-.
-This is a convenience procedure that returns the \fBcurrentsize\fR
-element of the state array, which represents the number of bytes
-received from the URL in the \fB::http::geturl\fR call.
-.TP
-\fB::http::requestLine\fR \fItoken\fR
-.
-This command returns the "request line" sent to the server.
-The "request line" is the first line of a HTTP client request, and has three
-elements separated by spaces: the HTTP method, the URL relative to the server,
-and the HTTP version. Examples:
-.PP
-.DS
-.RS
-GET / HTTP/1.1
-GET /introduction.html?subject=plumbing HTTP/1.1
-POST /forms/order.html HTTP/1.1
-.RE
-.DE
-.TP
-\fB::http::requestHeaders\fR \fItoken\fR ?\fIheaderName\fR?
-.
-This command returns a list of the HTTP request header names and values, in the
-order that they were sent to the server: a Tcl list of the form
-?name value ...? Header names are case-insensitive and are converted to lower
-case. The return value is not a \fBdict\fR because some header names may occur
-more than once. If one argument is supplied, all request headers
-are returned: the value is that of the \fBrequestHeaders\fR element
-of the state array (described below). If two arguments are supplied, the
-second provides the value of a header name. Only headers with the requested
-name (converted to lower case) are returned. If no such headers are found,
-an empty list is returned.
-.TP
-\fB::http::requestHeaderValue\fR \fItoken\fR \fIheaderName\fR
-.
-This command returns the value of the HTTP request header named
-\fIheaderName\fR. Header names are case-insensitive and are converted to
-lower case. If no such header exists, the return value is the empty string.
-If there are multiple headers named \fIheaderName\fR, the result is obtained
-by joining the individual values with the string ", " (comma and space),
-preserving their order.
-.TP
\fB::http::responseHeaders\fR \fItoken\fR ?\fIheaderName\fR?
.
This command returns a list of HTTP response header names and values, in the
@@ -659,16 +657,18 @@ comma-separated-list syntax and cannot be combined into a single value.
Each \fIset-cookie\fR header must be treated individually, e.g. by processing
the return value of \fB::http::responseHeaders\fR \fItoken\fR \fIset-cookie\fR.
.TP
-\fB::http::cleanup\fR \fItoken\fR
+\fB::http::responseBody\fR \fItoken\fR
.
-This procedure cleans up the state associated with the connection
-identified by \fItoken\fR. After this call, the procedures
-like \fB::http::data\fR cannot be used to get information
-about the operation. It is \fIstrongly\fR recommended that you call
-this function after you are done with a given HTTP request. Not doing
-so will result in memory not being freed, and if your app calls
-\fB::http::geturl\fR enough times, the memory leak could cause a
-performance hit...or worse.
+This command returns the entity sent by the HTTP server (unless
+\fI-channel\fR was used, in which case the entity was delivered to the
+channel, and the command returns the empty string).
+.RS
+.PP
+Other terms for
+"entity", with varying precision, include "representation of resource",
+"resource", "response body after decoding", "payload",
+"message body after decoding", "content", and "file".
+.RE
.TP
\fB::http::register\fR \fIproto port command\fR
.