{"id":544,"date":"2008-09-28T23:53:54","date_gmt":"2008-09-29T03:53:54","guid":{"rendered":"http:\/\/www.dr-chuck.com\/wordpress\/?p=544"},"modified":"2011-12-17T12:27:34","modified_gmt":"2011-12-17T16:27:34","slug":"google-app-engine-printing-out-all-the-request-parameters","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2008\/09\/google-app-engine-printing-out-all-the-request-parameters\/","title":{"rendered":"Google App Engine: Printing out all the Request Parameters"},"content":{"rendered":"<p>\nI figured out how to print all the request parameters in Google App Engine:<\/p>\n<p>\nlogging.info(self.request.params.items);<\/p>\n<p>\nIt looks like this:<\/p>\n<p>\nbound method UnicodeMultiDict.items of UnicodeMultiDict([(u&#8217;A&#8217;, u&#8217;3&#8242;), (u&#8217;b&#8217;, u&#8217;4&#8242;)])<\/p>\n<p>\nAlong the way, I found useful information by making a dir() of the request object:<\/p>\n<p>\nlogging.info(dir(self.request))<\/p>\n<p>\n[&#8216;GET&#8217;, &#8216;POST&#8217;, &#8216;ResponseClass&#8217;, &#8216;__class__&#8217;, &#8216;__delattr__&#8217;, &#8216;__dict__&#8217;, &#8216;__doc__&#8217;, &#8216;__getattr__&#8217;, &#8216;__getattribute__&#8217;, &#8216;__hash__&#8217;, &#8216;__init__&#8217;, &#8216;__module__&#8217;, &#8216;__new__&#8217;, &#8216;__reduce__&#8217;, &#8216;__reduce_ex__&#8217;, &#8216;__repr__&#8217;, &#8216;__setattr__&#8217;, &#8216;__str__&#8217;, &#8216;__weakref__&#8217;, &#8216;_body__del&#8217;, &#8216;_body__get&#8217;, &#8216;_body__set&#8217;, &#8216;_body_file__del&#8217;, &#8216;_body_file__get&#8217;, &#8216;_body_file__set&#8217;, &#8216;_cache_control__del&#8217;, &#8216;_cache_control__get&#8217;, &#8216;_cache_control__set&#8217;, &#8216;_environ&#8217;, &#8216;_environ_getter&#8217;, &#8216;_headers&#8217;, &#8216;_headers__get&#8217;, &#8216;_headers__set&#8217;, &#8216;_host__del&#8217;, &#8216;_host__get&#8217;, &#8216;_host__set&#8217;, &#8216;_urlargs__del&#8217;, &#8216;_urlargs__get&#8217;, &#8216;_urlargs__set&#8217;, &#8216;_urlvars__del&#8217;, &#8216;_urlvars__get&#8217;, &#8216;_urlvars__set&#8217;, &#8216;accept&#8217;, &#8216;accept_charset&#8217;, &#8216;accept_encoding&#8217;, &#8216;accept_language&#8217;, &#8216;application_url&#8217;, &#8216;arguments&#8217;, &#8216;blank&#8217;, &#8216;body&#8217;, &#8216;body_file&#8217;, &#8216;cache_control&#8217;, &#8216;call_application&#8217;, &#8216;charset&#8217;, &#8216;content_length&#8217;, &#8216;content_type&#8217;, &#8216;cookies&#8217;, &#8216;copy&#8217;, &#8216;copy_get&#8217;, &#8216;date&#8217;, &#8216;decode_param_names&#8217;, &#8216;environ&#8217;, &#8216;get&#8217;, &#8216;get_all&#8217;, &#8216;get_range&#8217;, &#8216;get_response&#8217;, &#8216;headers&#8217;, &#8216;host&#8217;, &#8216;host_url&#8217;, &#8216;if_match&#8217;, &#8216;if_modified_since&#8217;, &#8216;if_none_match&#8217;, &#8216;if_range&#8217;, &#8216;if_unmodified_since&#8217;, &#8216;is_xhr&#8217;, &#8216;max_forwards&#8217;, &#8216;method&#8217;, &#8216;params&#8217;, &#8216;path&#8217;, &#8216;path_info&#8217;, &#8216;path_info_peek&#8217;, &#8216;path_info_pop&#8217;, &#8216;path_qs&#8217;, &#8216;path_url&#8217;, &#8216;postvars&#8217;, &#8216;pragma&#8217;, &#8216;query&#8217;, &#8216;query_string&#8217;, &#8216;queryvars&#8217;, &#8216;range&#8217;, &#8216;referer&#8217;, &#8216;referrer&#8217;, &#8216;relative_url&#8217;, &#8216;remote_addr&#8217;, &#8216;remote_user&#8217;, &#8216;remove_conditional_headers&#8217;, &#8216;request_body_tempfile_limit&#8217;, &#8216;scheme&#8217;, &#8216;script_name&#8217;, &#8216;server_name&#8217;, &#8216;server_port&#8217;, &#8216;str_GET&#8217;, &#8216;str_POST&#8217;, &#8216;str_cookies&#8217;, &#8216;str_params&#8217;, &#8216;str_postvars&#8217;, &#8216;str_queryvars&#8217;, &#8216;unicode_errors&#8217;, &#8216;uri&#8217;, &#8216;url&#8217;, &#8216;urlargs&#8217;, &#8216;urlvars&#8217;, &#8216;user_agent&#8217;]<\/p>\n<p>\nlogging.info(dir(self.request.params))<\/p>\n<p>\n[&#8216;__cmp__&#8217;, &#8216;__contains__&#8217;, &#8216;__delitem__&#8217;, &#8216;__doc__&#8217;, &#8216;__getitem__&#8217;, &#8216;__init__&#8217;, &#8216;__iter__&#8217;, &#8216;__len__&#8217;, &#8216;__module__&#8217;, &#8216;__repr__&#8217;, &#8216;__setitem__&#8217;, &#8216;_decode_key&#8217;, &#8216;_decode_value&#8217;, &#8216;add&#8217;, &#8216;clear&#8217;, &#8216;copy&#8217;, &#8216;decode_keys&#8217;, &#8216;dict_of_lists&#8217;, &#8216;encoding&#8217;, &#8216;errors&#8217;, &#8216;get&#8217;, &#8216;getall&#8217;, &#8216;getone&#8217;, &#8216;has_key&#8217;, &#8216;items&#8217;, &#8216;iteritems&#8217;, &#8216;iterkeys&#8217;, &#8216;itervalues&#8217;, &#8216;keys&#8217;, &#8216;mixed&#8217;, &#8216;multi&#8217;, &#8216;pop&#8217;, &#8216;popitem&#8217;, &#8216;setdefault&#8217;, &#8216;update&#8217;, &#8216;values&#8217;]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I figured out how to print all the request parameters in Google App Engine: logging.info(self.request.params.items); It looks like this: bound method UnicodeMultiDict.items of UnicodeMultiDict([(u&#8217;A&#8217;, u&#8217;3&#8242;), (u&#8217;b&#8217;, u&#8217;4&#8242;)]) Along the way, I found useful information by making a dir() of the request object: logging.info(dir(self.request)) [&#8216;GET&#8217;, &#8216;POST&#8217;, &#8216;ResponseClass&#8217;, &#8216;__class__&#8217;, &#8216;__delattr__&#8217;, &#8216;__dict__&#8217;, &#8216;__doc__&#8217;, &#8216;__getattr__&#8217;, &#8216;__getattribute__&#8217;, &#8216;__hash__&#8217;, &#8216;__init__&#8217;, &#8216;__module__&#8217;, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-544","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=544"}],"version-history":[{"count":1,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/544\/revisions"}],"predecessor-version":[{"id":2649,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/544\/revisions\/2649"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}