class HTTPClient: (source)
Undocumented
Method | __init__ |
Undocumented |
Method | delete |
See :func:`treq.delete()`. |
Method | get |
See :func:`treq.get()`. |
Method | head |
See :func:`treq.head()`. |
Method | patch |
See :func:`treq.patch()`. |
Method | post |
See :func:`treq.post()`. |
Method | put |
See :func:`treq.put()`. |
Method | request |
See :func:`treq.request()`. |
Method | _request |
Here we choose a right producer based on the parameters passed in. |
Method | _request |
Convert the *headers* argument to a :class:`Headers` instance |
Instance Variable | _agent |
Undocumented |
Instance Variable | _cookiejar |
Undocumented |
Instance Variable | _data |
Undocumented |
See :func:`treq.request()`.
Here we choose a right producer based on the parameters passed in. :params data: Arbitrary request body data. If *files* is also passed this must be a :class:`dict`, a :class:`tuple` or :class:`list` of field tuples as accepted by :class:`MultiPartProducer`. The request is assigned a Content-Type of ``multipart/form-data``. If a :class:`dict`, :class:`list`, or :class:`tuple` it is URL-encoded and the request assigned a Content-Type of ``application/x-www-form-urlencoded``. Otherwise, any non-``None`` value is passed to the client's *data_to_body_producer* callable (by default, :class:`IBodyProducer`), which accepts file-like objects. :params files: Files to include in the request body, in any of the several formats described in :func:`_convert_files()`. :params json: JSON-encodable data, or the sentinel `_NOTHING`. The sentinel is necessary because ``None`` is a valid JSON value.