Lines Matching +full:set +full:- +full:url
1 ---
3 SPDX-License-Identifier: curl
7 See-also:
8 - CURLOPT_CURLU (3)
9 - curl_url (3)
10 - curl_url_cleanup (3)
11 - curl_url_dup (3)
12 - curl_url_set (3)
13 - curl_url_strerror (3)
15 - All
16 ---
20 curl_url_get - extract a part from a URL
27 CURLUcode curl_url_get(const CURLU *url,
35 Given a *url* handle of a URL object, this function extracts an individual
36 piece or the full URL from it.
48 The flags argument is zero, one or more bits set in a bitmask.
67 Asks curl_url_get(3) to URL decode the contents before returning it. It
68 does not decode the scheme, the port number or the full URL.
70 The query component also gets plus-to-space conversion as a bonus when this
71 bit is set.
73 Note that this URL decoding is charset unaware and you get a zero terminated
81 If set, curl_url_get(3) URL encodes the hostname part when a full URL is
82 retrieved. If not set (default), libcurl returns the URL with the hostname raw
83 to support IDN names to appear as-is. IDN hostnames are typically using
84 non-ASCII bytes that otherwise gets percent-encoded.
86 Note that even when not asking for URL encoding, the '%' (byte 37) is URL
91 If set and *CURLU_URLENCODE* is not set, and asked to retrieve the
93 name in its punycode version if it contains any non-ASCII octets (and is an
104 If set and asked to retrieve the **CURLUPART_HOST** or **CURLUPART_URL**
106 UTF-8 version if it otherwise is a punycode version. If the punycode name
119 query and fragments parts or when used in the full URL. By default, libcurl
120 otherwise considers empty parts non-existing.
132 When asked to return the full URL, curl_url_get(3) returns a normalized and
133 possibly cleaned up version using all available URL parts.
135 We advise using the *CURLU_PUNYCODE* option to get the URL as "normalized" as
139 Zero-length queries and fragments are excluded from the URL unless
140 CURLU_GET_EMPTY is set.
144 Scheme cannot be URL decoded on get.
154 schemes: pop3, smtp and imap. The URL API still allows users to set and get
163 IPv6 names are normalized when set, which should make them as short as
168 If the hostname is a numeric IPv6 address, this field might also be set.
172 A port cannot be URL decoded on get. This number is returned in a string just
179 in the URL. A URL path always starts with a slash.
186 A not-present query returns *part* set to NULL.
188 A zero-length query returns *part* as NULL unless CURLU_GET_EMPTY is set.
190 The query part gets pluses converted to space when asked to URL decode on get
198 A not-present fragment returns *part* set to NULL.
200 A zero-length fragment returns *part* as NULL unless CURLU_GET_EMPTY is set.
208 CURLU *url = curl_url();
209 rc = curl_url_set(url, CURLUPART_URL, "https://example.com", 0);
212 rc = curl_url_get(url, CURLUPART_SCHEME, &scheme, 0);
217 curl_url_cleanup(url);
229 fine. See the libcurl-errors(3) man page for the full list with
232 If this function returns an error, no URL part is returned.