Use Twisted's getPage as urlopen?
- by RadiantHex
Hi folks,
I would like to use Twisted non-blocking getPage method within a webapp, but it feels quite complicated to use such function compared to urlopen.
This is an example of what I'm trying to achive:
def web_request(request):
response = urllib.urlopen('http://www.example.org')
return HttpResponse(len(response.read()))
Is it so hard to have something similar with getPage?