Testing POST in cherrypy

Israel Brewster israel at ravnalaska.net
Tue Oct 4 12:29:56 EDT 2016


When testing CherryPy using a cherrypy.text.helper.CPWebCase subclass, I can test a page request by calling "self.getPage()", and in that call I can specify a method (GET/POST etc). When specifying a POST, how do I pass the parameters? I know for a POST the parameters are in the body of the request, but in what format? Do I just url lib.urlencode() a dictionary and pass that as the body, or is there some other method I should use? Thanks!
-----------------------------------------------
Israel Brewster
Systems Analyst II
Ravn Alaska
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7293
-----------------------------------------------







More information about the Python-list mailing list