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
 _response

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, e:
        print "Error:", e

Definition at line 46 of file httpclient.py.


Constructor & Destructor Documentation

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

Definition at line 60 of file httpclient.py.

Definition at line 68 of file httpclient.py.


Member Function Documentation

Closes the HTTPClient, freeing any resources used.

Definition at line 71 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 78 of file httpclient.py.


Member Data Documentation

Definition at line 60 of file httpclient.py.

Definition at line 60 of file httpclient.py.

Definition at line 60 of file httpclient.py.

Definition at line 60 of file 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