Package elisa :: Package core :: Package utils :: Module internet

Module internet

source code

Internet utilities.

Functions
elisa.core.utils.cancellable_defer.CancellableDeferred
get_page(uri)
A web resource getter similar to twisted.web.client.getPage that returns a cancellable deferred so that the query can be cancelled and the connection to the server closed.
source code

Imports: defer, CancellableDeferred, CancelledError, HTTPClientFactory, reactor, urlparse


Function Details

get_page(uri)

source code 

A web resource getter similar to twisted.web.client.getPage that returns a cancellable deferred so that the query can be cancelled and the connection to the server closed.

Parameters:
  • uri (str) - the URI of the resource to request
Returns: elisa.core.utils.cancellable_defer.CancellableDeferred
a cancellable deferred fired with the resource's data when done

Warning: The uri must be a str encoded in ASCII and conforming to the URI syntax standard (see http://tools.ietf.org/html/rfc3986 and urllib.quote).