Re: Running twisted http server - "Method Not Allowed" error
- From: Richard Townsend <richard@xxxxxxxxxx>
- Date: Tue, 31 May 2005 17:50:46 +0100
On 30 May 2005 23:50:45 -0700, qwejohn@xxxxxxxxxxx wrote:
> from twisted.web import server, resource
> from twisted.internet import reactor
>
> class Simple(resource.Resource):
> isLeaf = True
> def render_GET(self, request):
> return "<html>Hello, world!</html>"
>
> site = server.Site(Simple())
> reactor.listenTCP(8080, site)
> reactor.run() "
>
Try adding the line:
allowedMethods = ('GET',)
after the line
isLeaf = True
--
Richard
.
- References:
- Running twisted http server - "Method Not Allowed" error
- From: qwejohn
- Running twisted http server - "Method Not Allowed" error
- Prev by Date: Re: The need to put "self" in every method
- Next by Date: Re: The need to put "self" in every method
- Previous by thread: Running twisted http server - "Method Not Allowed" error
- Next by thread: Albatross 1.30 released
- Index(es):