curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Proposal: URL API extension, second setter function to allow setting from CURLU object

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 23 Oct 2023 08:57:54 +0200 (CEST)

On Sun, 22 Oct 2023, Mark Gaiser via curl-library wrote:

> I get that this is c-code and just the c-way of doing things. Still, it can
> be simplified a lot, even in c.
>
> I propose a new URL API function with the following signature:
> CURLUcode curl_url_set_o(CURLU *u, CURLUPart what,
> const CURLU *source, unsigned int flags)

Assuming you write a lot of code that cherry-picks components from one URL and
copies them into another, then this looks likes a shortcut yes. But it also
looks like a kind of function you can easily implement yourself, using
libcurl's API, in about twenty lines of code or so.

I'm not firmly against introducing a function like this, but I think it is
rather specific for a single use case that might not be what most URL API
users ever need.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-10-23