Public Member Functions | Public Attributes | Private Member Functions
tornado.simple_httpclient.SimpleAsyncHTTPClient Class Reference

List of all members.

Public Member Functions

def fetch
def initialize

Public Attributes

 active
 hostname_mapping
 io_loop
 max_buffer_size
 max_clients
 queue

Private Member Functions

def _process_queue
def _release_fetch

Detailed Description

Non-blocking HTTP client with no external dependencies.

This class implements an HTTP 1.1 client on top of Tornado's IOStreams.
It does not currently implement all applicable parts of the HTTP
specification, but it does enough to work with major web service APIs
(mostly tested against the Twitter API so far).

This class has not been tested extensively in production and
should be considered somewhat experimental as of the release of
tornado 1.2.  It is intended to become the default AsyncHTTPClient
implementation in a future release.  It may either be used
directly, or to facilitate testing of this class with an existing
application, setting the environment variable
USE_SIMPLE_HTTPCLIENT=1 will cause this class to transparently
replace tornado.httpclient.AsyncHTTPClient.

Some features found in the curl-based AsyncHTTPClient are not yet
supported.  In particular, proxies are not supported, connections
are not reused, and callers cannot select the network interface to be
used.

Python 2.6 or higher is required for HTTPS support.  Users of Python 2.5
should use the curl-based AsyncHTTPClient if HTTPS support is required.

Definition at line 38 of file simple_httpclient.py.


Member Function Documentation

Definition at line 109 of file simple_httpclient.py.

Definition at line 120 of file simple_httpclient.py.

def tornado.simple_httpclient.SimpleAsyncHTTPClient.fetch (   self,
  request,
  callback,
  kwargs 
)

Definition at line 94 of file simple_httpclient.py.

def tornado.simple_httpclient.SimpleAsyncHTTPClient.initialize (   self,
  io_loop = None,
  max_clients = 10,
  max_simultaneous_connections = None,
  hostname_mapping = None,
  max_buffer_size = 104857600 
)
Creates a AsyncHTTPClient.

Only a single AsyncHTTPClient instance exists per IOLoop
in order to provide limitations on the number of pending connections.
force_instance=True may be used to suppress this behavior.

max_clients is the number of concurrent requests that can be in
progress.  max_simultaneous_connections has no effect and is accepted
only for compatibility with the curl-based AsyncHTTPClient.  Note
that these arguments are only used when the client is first created,
and will be ignored when an existing client is reused.

hostname_mapping is a dictionary mapping hostnames to IP addresses.
It can be used to make local DNS changes when modifying system-wide
settings like /etc/hosts is not possible or desirable (e.g. in
unittests).

max_buffer_size is the number of bytes that can be read by IOStream. It
defaults to 100mb.

Definition at line 64 of file simple_httpclient.py.


Member Data Documentation

Definition at line 83 of file simple_httpclient.py.

Definition at line 83 of file simple_httpclient.py.

Definition at line 83 of file simple_httpclient.py.

Definition at line 83 of file simple_httpclient.py.

Definition at line 83 of file simple_httpclient.py.

Definition at line 83 of file simple_httpclient.py.


The documentation for this class was generated from the following file:


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Mon Oct 6 2014 06:58:14