[Twisted-web] Sending Get to Resource Produces Nonsensical Error Message

Jonathan Mark jonathansamuel at yahoo.com
Thu Feb 16 22:51:19 MST 2006

My rpy script that instantiates a resource produces
the following error message when I call it within a

Method Not AllowedYour browser approached me (at
with the method "GET".  I only allow the method GET

Since the message recognizes that it is being sent a
GET, why does it tell me that it only allows a GET?

Here is the resource:

from twisted.web.resource import Resource
class MyResource(Resource):
    isLeaf = True
    allowedMethods = ('GET',)
    def render_GET(self, request):
        return "<html>Hello, world!</html>"
resource = MyResource()

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Twisted-web mailing list