[Web-SIG] WSGI async API

Peter Hunt floydophone at gmail.com
Fri Oct 15 19:24:19 CEST 2004

Essentially, Twisted.Web gives you something like this:

class MyResource(resource.Resource):
    def render(self, request):
        return "content here" # you could also do request.write("content here")

If you do an async call, you have to use request.write() to write the
data, return server.NOT_DONE_YET from the render() method, and call
request.finish() to finish the request.

On Fri, 15 Oct 2004 11:31:56 -0400, Phillip J. Eby
<pje at telecommunity.com> wrote:
> At 06:57 AM 10/15/04 -0400, Peter Hunt wrote:
> >So if I'm implementing a Twisted gateway, where should
> >request.finish() go? This has been puzzling me for some time...
> What's request.finish()?  I've never done anything with Twisted at a higher
> level than the raw reactor interface, and a bit with Deferreds.  So I'm not
> sure what you're talking about here.

More information about the Web-SIG mailing list