Public Member Functions | Private Attributes
tornado.httpclient.HTTPClient Class Reference

List of all members.

Public Member Functions

def __del__
def __init__
def close
def fetch

Private Attributes

 _async_client
 _closed
 _io_loop

Detailed Description

A blocking HTTP client.

This interface is provided for convenience and testing; most applications
that are running an IOLoop will want to use `AsyncHTTPClient` instead.
Typical usage looks like this::

    http_client = httpclient.HTTPClient()
    try:
        response = http_client.fetch("http://www.google.com/")
        print response.body
    except httpclient.HTTPError as e:
        print "Error:", e
    http_client.close()

Definition at line 54 of file httpclient.py.


Constructor & Destructor Documentation

def tornado.httpclient.HTTPClient.__init__ (   self,
  async_client_class = None,
  kwargs 
)

Definition at line 69 of file httpclient.py.

Definition at line 76 of file httpclient.py.


Member Function Documentation

Closes the HTTPClient, freeing any resources used.

Definition at line 79 of file httpclient.py.

def tornado.httpclient.HTTPClient.fetch (   self,
  request,
  kwargs 
)
Executes a request, returning an `HTTPResponse`.

The request may be either a string URL or an `HTTPRequest` object.
If it is a string, we construct an `HTTPRequest` using any additional
kwargs: ``HTTPRequest(request, **kwargs)``

If an error occurs during the fetch, we raise an `HTTPError`.

Definition at line 86 of file httpclient.py.


Member Data Documentation

Definition at line 69 of file httpclient.py.

Definition at line 69 of file httpclient.py.

Definition at line 69 of file httpclient.py.


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


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Thu Aug 27 2015 14:50:40