Request helper classes.
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
Function Summary |
|
decode_value(s,
encoding)
|
|
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. |
|
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'. |
|
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'. |
|
get_storage_items (storage_body)
Return the items (2-tuples of the form key, values) from the
'storage_body'. |
|
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. |