1curl_url_dup(3)                 libcurl Manual                 curl_url_dup(3)
2
3
4

NAME

6       curl_url_dup - duplicate a CURLU handle
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLU *curl_url_dup(CURLU *inhandle);
12

DESCRIPTION

14       Duplicates  a  given  CURLU inhandle and all its contents and returns a
15       pointer to a new CURLU handle. The new handle also needs  to  be  freed
16       with curl_url_cleanup(3).
17

EXAMPLE

19         CURLUcode rc;
20         CURLU *url = curl_url();
21         CURLU *url2;
22         rc = curl_url_set(url, CURLUPART_URL, "https://example.com", 0);
23         if(!rc) {
24           url2 = curl_url_dup(url); /* clone it! */
25           curl_url_cleanup(url2);
26         }
27         curl_url_cleanup(url);
28

AVAILABILITY

30       Added in 7.62.0
31

RETURN VALUE

33       Returns a new handle or NULL if out of memory.
34

SEE ALSO

36       curl_url_cleanup(3),   curl_url(3),  curl_url_set(3),  curl_url_get(3),
37       CURLOPT_CURLU(3),
38
39
40
41libcurl 7.82.0                 November 26, 2021               curl_url_dup(3)
Impressum