5. HTTPClient

5.1. Synopsis

>>> from http import Request
>>> from httpclient import HTTPClient
>>> request = Request('GET', 'http://lumberjaph.net')
>>> client = HTTPClient()
>>> client.request(request)
>>> response = client.request(request)
>>> print response.status
200

5.2. Interface

HTTPClient instances have the following methods:

class httpclient.HTTPClient
HTTPException(fn)
add_handler(position, cb)
default_header(key)
default_headers
delete(*args)
get(*args)
head(*args)
mirror(*args)
post(*args)
put(*args)
remove_handler(position)
request(*args)