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

NAME

6       curl_url - returns a new CURLU handle
7

SYNOPSIS

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

EXPERIMENTAL

14       The  URL  API  is  considered EXPERIMENTAL until further notice. Please
15       test it, report bugs and help us perfect it. Once proven  to  be  reli‐
16       able, the experimental label will be removed.
17
18       While  this  API is marked experimental, we reserve the right to modify
19       the API slightly if we deem it necessary and it makes it notably better
20       or easier to use.
21

DESCRIPTION

23       This  function  will  allocates  and returns a pointer to a fresh CURLU
24       handle, to be used for further use of the URL API.
25

RETURN VALUE

27       Returns a CURLU * if successful, or NULL if out of memory.
28

EXAMPLE

30         CURLUcode rc;
31         CURLU *url = curl_url();
32         rc = curl_url_set(url, CURLUPART_URL, "https://example.com", 0);
33         if(!rc) {
34           char *scheme;
35           rc = curl_url_get(url, CURLUPART_SCHEME, &scheme, 0);
36           if(!rc) {
37             printf("the scheme is %s\n", scheme);
38             curl_free(scheme);
39           }
40           curl_url_cleanup(url);
41         }
42

AVAILABILITY

44       Added in curl 7.62.0
45

SEE ALSO

47       curl_url_cleanup(3), curl_url_get(3), curl_url_set(3), curl_url_dup(3),
48
49
50
51libcurl 7.64.0                 January 29, 2019                    curl_url(3)
Impressum