1.1 --- a/WebStack/Generic.py Mon Sep 06 21:29:59 2004 +0000
1.2 +++ b/WebStack/Generic.py Mon Sep 06 21:31:04 2004 +0000
1.3 @@ -281,9 +281,9 @@
1.4 def get_fields_from_path(self):
1.5
1.6 """
1.7 - Extracts the form fields from the path specified in the transaction. The
1.8 - underlying framework may refuse to supply fields from the path if
1.9 - handling a POST transaction.
1.10 + Extracts fields (or request parameters) from the path specified in the
1.11 + transaction. The underlying framework may refuse to supply fields from
1.12 + the path if handling a POST transaction.
1.13
1.14 Returns a dictionary mapping field names to lists of values (even if a
1.15 single value is associated with any given field name).
1.16 @@ -294,10 +294,10 @@
1.17 def get_fields_from_body(self, encoding=None):
1.18
1.19 """
1.20 - Extracts the form fields from the message body in the transaction. The
1.21 - optional 'encoding' parameter specifies the character encoding of the
1.22 - message body for cases where no such information is available, but where
1.23 - the default encoding is to be overridden.
1.24 + Extracts fields (or request parameters) from the message body in the
1.25 + transaction. The optional 'encoding' parameter specifies the character
1.26 + encoding of the message body for cases where no such information is
1.27 + available, but where the default encoding is to be overridden.
1.28
1.29 Returns a dictionary mapping field names to lists of values (even if a
1.30 single value is associated with any given field name). Each value is
1.31 @@ -307,6 +307,27 @@
1.32
1.33 raise NotImplementedError, "get_fields_from_body"
1.34
1.35 + def get_fields(self, encoding=None):
1.36 +
1.37 + """
1.38 + Extracts fields (or request parameters) from both the path specified in
1.39 + the transaction as well as the message body. The optional 'encoding'
1.40 + parameter specifies the character encoding of the message body for cases
1.41 + where no such information is available, but where the default encoding
1.42 + is to be overridden.
1.43 +
1.44 + Returns a dictionary mapping field names to lists of values (even if a
1.45 + single value is associated with any given field name). Each value is
1.46 + either a Unicode object (representing a simple form field, for example)
1.47 + or a plain string (representing a file upload form field, for example).
1.48 +
1.49 + Where a given field name is used in both the path and message body to
1.50 + specify values, the values from both sources will be combined into a
1.51 + single list associated with that field name.
1.52 + """
1.53 +
1.54 + raise NotImplementedError, "get_fields"
1.55 +
1.56 def get_user(self):
1.57
1.58 """