gnurl_url_dup(3)
π NAME π
Okay bestie, you're reading gnurl_url_dup(3) from the libgnurl Manual, and the NAME line is giving: curl_url_dup β duplicate a CURLU handle. Short, sweet, iconic. π
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLU *curl_url_dup(CURLU *inhandle);
π¦ DESCRIPTION π¦
So basically, this function duplicates a given CURLU inhandle and all its contents, then returns a pointer to a new CURLU handle. Main character energy: the new handle also needs to be freed with curl_url_cleanup(3). Don't ghost it, bestie. π
πΈ RETURN VALUE πΈ
Returns a new handle, or NULL if out of memory. That's the tea. π
π EXAMPLE π
CURLUcode rc;
CURLU *url = curl_url();
CURLU *url2;
rc = curl_url_set(url, CURLUPART_URL, "https://example.com", 0);
if(!rc) {
url2 = curl_url_dup(url); /* clone it! */
curl_url_cleanup(url2);
}
curl_url_cleanup(url);
β AVAILABILITY β
Added in curl 7.62.0 β yes, she's been iconic since then. π
π SEE ALSO π
Go read these next, bestie:
xoxo, this page is from libcurl, dated 6 Aug 2018 πβ¨
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms