curl / Mailing Lists / curl-library / Single Mail


Re: a URL API ?

From: Daniel Stenberg <>
Date: Mon, 6 Aug 2018 10:07:36 +0200 (CEST)

On Thu, 2 Aug 2018, Daniel Stenberg wrote:

> Good or bad? What would your application need and would this work for that?

I've written some initial code for this API [1] now. As I proceed further, I
intend to remove the wiki page as I suspect there will be a lot of details
that have changed and I'll instead get the details right and documented in the
coming man pages for the new stuff.

curl_url() mostly works and there's a bunch of tests for the fundamentals.

curl_url_get() works to extract all the parsed parts except CURLUPART_URL.

curl_url_cleanup() works.

The initial work exists in a separate branch [2] - and as long as I'm the only
developer in this branch I intend to rebase and squash it regularly. Just

The current api header can also be browsed online at [3].

Next up, I intend to:

- implement the missing pieces of the API:
   curl_url_get's CURLUPART_URL option

- add more test cases to make sure the functions work, also to make it easy to
   add more tests later
- write documentation for the new functions and options
- make use of the new parser for the existing libcurl functionlity to reduce
   code duplication and make sure the URL API and the libcurl transfer engine
   treat URLs identically
- add a curl_easy_setopt() option to take a CURLURL pointer instead of a URL
- consider command line tool access to the URL API for parsing URLs

There's not yet any schedule for when this can land. I intend to mark this API
as "experimental" for the first few releases it appears to signal to users and
us all what to expect from it. Maybe this is 7.63.0 material?

[1] =

[2] =

[3] =

Received on 2018-08-06