try:
import twisted
+ assert twisted
except ImportError:
print "*******"
print "Twisted is needed to use leap.common.http module"
return d
def request(self, url, method='GET', body=None, headers={},
- callback=readBody):
+ callback=readBody):
"""
Perform an HTTP request, but limit the maximum amount of concurrent
connections.
callable(callback),
message="The callback parameter should be a callable!")
return self._semaphore.run(self._request, url, method, body, headers,
- callback)
+ callback)
def close(self):
"""