Thursday, July 14, 2011

Making up a GET request in bottle

Problem: I'm using bottle for a desktop browser based app. I needed to call a page view from an action. The page view normally gets some parameters encoded in a GET request.

Solution: The GET request can be faked by doing:
request.GET.append(key, value)

Since
request.GET
is just a dictionary.

No comments:

Post a Comment