Public Member Functions | |
def | close |
def | fetch_impl |
def | initialize |
Public Attributes | |
active | |
max_buffer_size | |
max_clients | |
max_header_size | |
own_resolver | |
queue | |
resolver | |
tcp_client | |
waiting | |
Private Member Functions | |
def | _handle_request |
def | _on_timeout |
def | _process_queue |
def | _release_fetch |
def | _remove_timeout |
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. 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.
Definition at line 52 of file simple_httpclient.py.
def tornado.simple_httpclient.SimpleAsyncHTTPClient._handle_request | ( | self, | |
request, | |||
release_callback, | |||
final_callback | |||
) | [private] |
Definition at line 141 of file simple_httpclient.py.
def tornado.simple_httpclient.SimpleAsyncHTTPClient._on_timeout | ( | self, | |
key | |||
) | [private] |
Definition at line 157 of file simple_httpclient.py.
def tornado.simple_httpclient.SimpleAsyncHTTPClient._process_queue | ( | self | ) | [private] |
Definition at line 130 of file simple_httpclient.py.
def tornado.simple_httpclient.SimpleAsyncHTTPClient._release_fetch | ( | self, | |
key | |||
) | [private] |
Definition at line 146 of file simple_httpclient.py.
def tornado.simple_httpclient.SimpleAsyncHTTPClient._remove_timeout | ( | self, | |
key | |||
) | [private] |
Definition at line 150 of file simple_httpclient.py.
Definition at line 107 of file simple_httpclient.py.
def tornado.simple_httpclient.SimpleAsyncHTTPClient.fetch_impl | ( | self, | |
request, | |||
callback | |||
) |
Definition at line 113 of file simple_httpclient.py.
def tornado.simple_httpclient.SimpleAsyncHTTPClient.initialize | ( | self, | |
io_loop, | |||
max_clients = 10 , |
|||
hostname_mapping = None , |
|||
max_buffer_size = 104857600 , |
|||
resolver = None , |
|||
defaults = None , |
|||
max_header_size = None |
|||
) |
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. Note that this 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.
Definition at line 82 of file simple_httpclient.py.
Definition at line 82 of file simple_httpclient.py.
Definition at line 82 of file simple_httpclient.py.
Definition at line 82 of file simple_httpclient.py.
Definition at line 82 of file simple_httpclient.py.
Definition at line 82 of file simple_httpclient.py.
Definition at line 82 of file simple_httpclient.py.
Definition at line 82 of file simple_httpclient.py.
Definition at line 82 of file simple_httpclient.py.