Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
URL API #2842
The URL API. Man pages with all the details and a fair amount of tests are included. I encourage all interested parties to try it out and report your experiences, both good and bad!
I'm saving these items until after the initial merge and done as separate PRs:
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.