HTTP Client¶
django_futures.http_client.py
http_client.py – Asynchronous HTTP Client¶
This is a ‘smart’ HTTPClient wrapper that also makes requests a bit simpler by borrowing conventions from the ‘requests’ module.
If a tornado IOLoop is running, then async requests are made.
Otherwise, tornado’s run_sync() method is used to make the
calls synchronous.
-
class
django_futures.http_client.HttpClient(*args, **kwargs)[source]¶ Bases:
objectDocstring for HttpClient
-
get(url, params=None, **kwargs)[source]¶ GET wrapper. Always returns a future.
Parameters: - url (type description) – arg description
- kwargs (type description) – arg description
Returns: Return type:
-