# HG changeset patch # User paulb # Date 1113255143 0 # Node ID effeae83e02756a81daed546e4715faa635bd4a0 # Parent 06fde0b81b28884dc267cfc2ac6ccc9ac6b69336 [project @ 2005-04-11 21:32:23 by paulb] Improved the stylesheet. Added file upload and response descriptions. diff -r 06fde0b81b28 -r effeae83e027 docs/parameters.html --- a/docs/parameters.html Mon Apr 11 17:53:52 2005 +0000 +++ b/docs/parameters.html Mon Apr 11 21:32:23 2005 +0000 @@ -38,6 +38,12 @@ used. +
One useful application of parameters transferred in request bodies is the
+sending or uploading of file contents through such parameters - this is
+described in "Request Body Parameters". Another way of uploading content in
+conjunction with the PUT
request
+method is mentioned below.
When handling requests in your application, instead of treating request as
+containers of parameters and using the WebStack API methods to access those
+parameters, you can instead choose to read directly from the data sent by the
+user and interpret that data in your own way. In most situations, this is not
+really necessary - those methods will decode request parameters (for example,
+form fields) in a way which is fairly convenient - but when files are being
+sent, and when the request method is specified as
+PUT
, it is necessary to obtain the input stream from the request
+and to read the file contents from that stream.
When the request does not contain standard form-encoded parameter
+information and instead contains the contents of an uploaded file, methods
+like get_fields
and get_fields_from_body
should be
+avoided and other methods in the transaction employed.
get_request_stream
get_content_type
WebStack.Generic.ContentType
) which describes the request
+ body's contents.The purpose and behaviour of PUT
request methods is described in the HTTP
+specification.