URL API #2842
Is there any reason why
CURLUcode curl_url(char *URL, CURLURL **urlhandle, unsigned int flags)
This function makes a call to
UPDATE: Forgot to say: Thanks for this API, it is very useful!
I'm not entirely happy with how
CURLURL *h; rc = curl_url("http://example.com", &h, 0); /* create handle *
I suspect that way of storing the handle pointer is going to cause users grief. A bit too unusual.
CURLURL *h = curl_url(); /* create handle */ curl_url_set(h, CURLUPART_URL, "http://example.com", 0);
It is more in style with how our other APIs work and makes sure there's one single way to set URL in the handle,
Syntax-check a URL
A downside with this approach is that there's no longer any "shortcut" for just syntax-checking a URL without creating a handle, but then again I'm not convinced that's a very important feature.