Debian Codegraph @

doc/docstrings/curl.rst

raw
1 Curl() -> New Curl object
2
3 Creates a new :ref:`curlobject` which corresponds to a
4 ``CURL`` handle in libcurl. Curl objects automatically set
5 CURLOPT_VERBOSE to 0, CURLOPT_NOPROGRESS to 1, provide a default
6 CURLOPT_USERAGENT and setup CURLOPT_ERRORBUFFER to point to a
7 private error buffer.
8
9 Implicitly calls :py:func:`pycurl.global_init` if the latter has not yet been called.
10
11 The ``Curl`` object can be used as a context manager. Exiting the
12 context calls ``close()``.
13
14 Example::
15
16 with pycurl.Curl() as c:
17 # perform operations