Bases: object
A client handle a connection at a time. A client is threadsafe, but an handled shouldn’t be shared between threads. All connections are shared between threads via a pool.
>>> from restkit import *
>>> c = Client()
>>> r = c.request("http://google.com")
>>> r.status
'301 Moved Permanently'
>>> r.body_string()
'<HTML><HEAD><meta http-equiv="content-type [...]'
>>> c.follow_redirect = True
>>> r = c.request("http://google.com")
>>> r.status
'200 OK'
get a connection from the pool or create new one.
return final respons, it is only accessible via peform method
Populate filters from self.filters. Must be called each time self.filters is updated.
create final header string
perform the request. If an error happen it will first try to restart it
do the proxy connection
reset request, set new url of request and perform it
perform immediatly a new request
alias of Response