pysite.tools.httptools module

class pysite.tools.httptools.HTTPRequestData(post_values, query_string, cookies)

Bases: object

get_any_value(varname, defval=None)
get_post_value(varname, defval=None)

Try to extract an x-www-form-urlencoded POST value. If the value is not available devfval (default: None) will be returned

Parameters:
  • varname (unicode/str) – The name of the variable you wish to fetch
  • defval (unicode/str) – Default value if the variable does not exist
Returns:

Returns the variable value or defval

Return type:

unicode/str

get_qs_value(varname, defval=None)