Lines Matching +full:set +full:- +full:url
21 .\" * SPDX-License-Identifier: curl
26 curl_url_set - set a URL part
31 CURLUcode curl_url_set(CURLU *url,
37 Given the \fIurl\fP handle of an already parsed URL, this function lets the
38 user set/update individual pieces of it.
40 The \fIpart\fP argument should identify the particular URL part (see list
41 below) to set or change, with \fIcontent\fP pointing to a null-terminated
42 string with the new contents for that URL part. The contents should be in the
43 form and encoding they'd use in a URL: URL encoded.
52 supported built-in. To make libcurl parse URLs generically even for schemes it
54 set. Otherwise, this function returns \fICURLUE_UNSUPPORTED_SCHEME\fP on URL
64 Allows the full URL of the handle to be replaced. If the handle already is
65 populated with a URL, the new URL can be relative to the previous.
67 When successfully setting a new URL, relative or absolute, the handle contents
68 will be replaced with the information of the newly set URL.
70 Pass a pointer to a null-terminated string to the \fIurl\fP parameter. The
71 string must point to a correctly formatted "RFC 3986+" URL or be a NULL
74 Unless \fICURLU_NO_AUTHORITY\fP is set, a blank host name is not allowed in
75 the URL.
77 Scheme cannot be URL decoded on set. libcurl only accepts setting schemes up
85 independently set this field at will.
88 says or UTF-8 (when WinIDN is used). If it is a bracketed IPv6 numeric address
91 Unless \fICURLU_NO_AUTHORITY\fP is set, a blank host name is not allowed to set.
93 If the host name is a numeric IPv6 address, this field can also be set.
95 Port cannot be URL encoded on set. The given port number is provided as a
99 If a path is set in the URL without a leading slash, a slash will be inserted
100 automatically when this URL is read from the handle.
102 The query part will also get spaces converted to pluses when asked to URL
103 encode on set with the \fICURLU_URLENCODE\fP bit.
108 The question mark in the URL is not part of the actual query contents.
110 The hash sign in the URL is not part of the actual fragment contents.
112 The flags argument is zero, one or more bits set in a bitmask.
115 part will then instead be appended at the end of the existing query - and if
120 first '=' symbol will not be URL encoded.
122 If set, allows \fIcurl_url_set(3)\fP to set a non-supported scheme.
124 When set, \fIcurl_url_set(3)\fP URL encodes the part on entry, except for
125 scheme, port and URL.
127 When setting the path component with URL encoding enabled, the slash character
130 The query part gets space-to-plus conversion before the URL conversion.
132 This URL encoding is charset unaware and will convert the input on a
133 byte-by-byte manner.
135 If set, will make libcurl allow the URL to be set without a scheme and then
137 option if both are set.
139 If set, will make libcurl allow the URL to be set without a scheme and it
141 the outermost sub-domain name matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then
143 \fICURLU_DEFAULT_SCHEME\fP option which takes precedence if both are set.
145 If set, skips authority checks. The RFC allows individual schemes to omit the
150 When set for \fBCURLUPART_URL\fP, this makes libcurl skip the normalization of
152 dot-slash and dot-dot etc. The same option used for transfers is called
155 If set, the URL parser allows space (ASCII 32) where possible. The URL
158 When space is used and allowed in a URL, it will be stored as-is unless
159 \fICURLU_URLENCODE\fP is also set, which then makes libcurl URL-encode the
160 space before stored. This affects how the URL will be constructed when
161 \fIcurl_url_get(3)\fP is subsequently used to extract the full URL or
164 If set, the URL parser will not accept embedded credentials for the
170 CURLU *url = curl_url();
171 rc = curl_url_set(url, CURLUPART_URL, "https://example.com", 0);
174 /* change it to an FTP URL */
175 rc = curl_url_set(url, CURLUPART_SCHEME, "ftp", 0);
177 curl_url_cleanup(url);
183 went fine. See the \fIlibcurl-errors(3)\fP man page for the full list with
186 A URL string passed on to \fIcurl_url_set(3)\fP for the \fBCURLUPART_URL\fP
190 If this function returns an error, no URL part is set.