summaryrefslogtreecommitdiff
path: root/doc/docstrings/curl_duphandle.rst
blob: ca6e7a878ac11b62a56676fc7b2dbebc1949510f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
duphandle() -> Curl

Clone a curl handle. This function will return a new curl handle,
a duplicate, using all the options previously set in the input curl handle.
Both handles can subsequently be used independently.

The new handle will not inherit any state information, no connections,
no SSL sessions and no cookies. It also will not inherit any share object
states or options (it will be made as if SHARE was unset).

Corresponds to `curl_easy_duphandle`_ in libcurl.

Example usage::

    import pycurl
    curl = pycurl.Curl()
    curl.setopt(pycurl.URL, "https://python.org")
    dup = curl.duphandle()
    curl.perform()
    dup.perform()

.. _curl_easy_duphandle:
    https://curl.se/libcurl/c/curl_easy_duphandle.html