CURLU *
handle represents a URL, or at parts of a URL, and you can easily extract that URL at any point:curl_free()
after you are done with it.CURLU_DEFAULT_PORT
curl_url_get()
return the default port for the used scheme.CURLU_DEFAULT_SCHEME
curl_url_get()
return the default scheme instead of error.CURLU_NO_DEFAULT_PORT
curl_url_get()
to not use a port number in the generated URL if that port number matches the default port used for the scheme. For example, if port number 443 is set and the scheme is https
, the extracted URL will not include the port number.CURLU_URLENCODE
curl_url_get()
URL encode the host name part when a full URL is retrieved. If not set (default), libcurl returns the URL with the host name "raw" to support IDN names to appear as-is. IDN host names are typically using non-ASCII bytes that otherwise will be percent-encoded.%
(byte 37) will be URL encoded in host names to make sure the host name remains valid.