Trees | Index | Help |
---|
Package WebStack :: Package Helpers :: Module Request |
|
Request helper classes. Copyright (C) 2004, 2005, 2006 Paul Boddie <paul@boddie.org.uk> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Classes | |
---|---|
ContentType |
A container for content type information. |
Cookie |
A simple cookie class for frameworks which do not return cookies in structured form. |
FileContent |
A simple class representing uploaded file content. |
HeaderValue |
A container for header information. |
MessageBodyStream |
A naive stream class, providing a non-blocking stream for transactions when reading the message body. |
Function Summary | |
---|---|
decode_value(s,
encoding)
| |
Taking items from the 'all_fields' dictionary, produce a new dictionary which does not contain items from the 'fields_from_path' dictionary. | |
Returns the appropriate value for the given 'field_str' string using the given 'encoding'. | |
Returns the appropriate value for the given 'field_value' either for a normal form field (thus employing the given 'encoding') or for a file upload field (returning a plain string). | |
Returns a dictionary mapping field names to lists of field values for all entries in the given 'field_items' (2-tuples of the form key, values) using the given 'encoding'. | |
Returns a dictionary mapping field names to lists of values for the data encoded in the given 'query_string'. | |
Return the items (2-tuples of the form key, values) from the 'storage_body'. | |
Create an object of the given 'header_class' by determining the details of the given 'header_value_str' - a string containing the value of a particular header. | |
Parse the given 'headers' dictionary (containing names mapped to values), returing a dictionary mapping names to HeaderValue objects. |
Function Details |
---|
filter_fields(all_fields, fields_from_path)Taking items from the 'all_fields' dictionary, produce a new dictionary which does not contain items from the 'fields_from_path' dictionary. Return a new dictionary. |
get_body_field(field_str, encoding)Returns the appropriate value for the given 'field_str' string using the given 'encoding'. |
get_body_field_or_file(field_value, encoding)Returns the appropriate value for the given 'field_value' either for a normal form field (thus employing the given 'encoding') or for a file upload field (returning a plain string). |
get_body_fields(field_items, encoding)Returns a dictionary mapping field names to lists of field values for all entries in the given 'field_items' (2-tuples of the form key, values) using the given 'encoding'. This is used in conjunction with FieldStorage objects. |
get_fields_from_query_string(query_string, decoder)Returns a dictionary mapping field names to lists of values for the data encoded in the given 'query_string'. Use the given 'decoder' function or method to process the URL-encoded values. |
get_storage_items(storage_body)Return the items (2-tuples of the form key, values) from the 'storage_body'. This is used in conjunction with FieldStorage objects. |
parse_header_value(header_class, header_value_str)Create an object of the given 'header_class' by determining the details of the given 'header_value_str' - a string containing the value of a particular header. |
parse_headers(headers)Parse the given 'headers' dictionary (containing names mapped to values), returing a dictionary mapping names to HeaderValue objects. |
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Thu Mar 1 00:37:14 2007 | http://epydoc.sf.net |