• Home
  • Raw
  • Download

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_get (3)
13 - curl_url_strerror (3)
15 - All
16 ---
20 curl_url_set - set a URL part
27 CURLUcode curl_url_set(CURLU *url,
35 The *url* handle to work on, passed in as the first argument, must be a
38 This function sets or updates individual URL components, or parts, held by the
39 URL object the handle identifies.
41 The *part* argument should identify the particular URL part (see list below)
42 to set or change, with *content* pointing to a null-terminated string with the
43 new contents for that URL part. The contents should be in the form and
44 encoding they would use in a URL: URL encoded.
46 When setting a part in the URL object that was previously already set, it
60 When setting or updating contents of individual URL parts, curl_url_set(3)
61 might accept data that would not be otherwise possible to set in the string
62 when it gets populated as a result of a full URL parse. Beware. If done so,
63 extracting a full URL later on from such components might render an invalid
64 URL.
72 Allows the full URL of the handle to be replaced. If the handle already is
73 populated with a URL, the new URL can be relative to the previous.
75 When successfully setting a new URL, relative or absolute, the handle contents
76 is replaced with the components of the newly set URL.
78 Pass a pointer to a null-terminated string to the *url* parameter. The
79 string must point to a correctly formatted "RFC 3986+" URL or be a NULL
83 that are supported built-in. To make libcurl parse URLs generically even for
85 must be set. Otherwise, this function returns *CURLUE_UNSUPPORTED_SCHEME* for
86 URL schemes it does not recognize.
88 Unless *CURLU_NO_AUTHORITY* is set, a blank hostname is not allowed in
89 the URL.
93 Scheme cannot be URL decoded on set. libcurl only accepts setting schemes up
98 If only the user part is set and not the password, the URL is represented with
103 If only the password part is set and not the user, the URL is represented with
111 independently set this field.
116 encoded as your locale says or UTF-8 (when WinIDN is used). If it is a
120 Note that if you set an IPv6 address, it gets ruined and causes an error if
121 you also set the CURLU_URLENCODE flag.
123 Unless *CURLU_NO_AUTHORITY* is set, a blank hostname is not allowed to set.
127 If the hostname is a numeric IPv6 address, this field can also be set.
131 The port number cannot be URL encoded on set. The given port number is
137 If a path is set in the URL without a leading slash, a slash is prepended
142 The query part gets spaces converted to pluses when asked to URL encode on set
148 The question mark in the URL is not part of the actual query contents.
152 The hash sign in the URL is not part of the actual fragment contents.
156 The flags argument is zero, one or more bits set in a bitmask.
161 part is then appended at the end of the existing query - and if the previous
166 first '=' symbol is not URL encoded.
170 If set, allows curl_url_set(3) to set a non-supported scheme.
174 When set, curl_url_set(3) URL encodes the part on entry, except for
175 **scheme**, **port** and **URL**.
177 When setting the path component with URL encoding enabled, the slash character
180 The query part gets space-to-plus converted before the URL conversion is
183 This URL encoding is charset unaware and converts the input in a byte-by-byte
188 If set, allows the URL to be set without a scheme and then sets that to the
190 are set.
194 If set, allows the URL to be set without a scheme and it instead "guesses"
198 option which takes precedence if both are set.
202 If set, skips authority checks. The RFC allows individual schemes to omit the
209 When set for **CURLUPART_URL**, this skips the normalization of the
211 dot-slash and dot-dot etc. The same option used for transfers is called
216 If set, the URL parser allows space (ASCII 32) where possible. The URL syntax
219 When space is used and allowed in a URL, it is stored as-is unless
220 *CURLU_URLENCODE* is also set, which then makes libcurl URL encode the
221 space before stored. This affects how the URL is constructed when
222 curl_url_get(3) is subsequently used to extract the full URL or
227 If set, the URL parser does not accept embedded credentials for the
237 CURLU *url = curl_url();
238 rc = curl_url_set(url, CURLUPART_URL, "https://example.com", 0);
240 /* change it to an FTP URL */
241 rc = curl_url_set(url, CURLUPART_SCHEME, "ftp", 0);
243 curl_url_cleanup(url);
254 went fine. See the libcurl-errors(3) man page for the full list with
260 If this function returns an error, no URL part is set.