Re: curl_easy_cmdline ?

2021-03-25 Thread Daniel Stenberg via curl-library
On Thu, 25 Mar 2021, Timothe Litt via curl-library wrote: Note that we already provide curl_easy_option_next(), which can iterate over all known easy options and return info about them. And curl_easy_option_by_id() to look up an option by its id. So a lot of pieces are already there... That'

Re: curl_easy_cmdline ?

2021-03-25 Thread Timothe Litt via curl-library
I've been off-line, so this is a late reply.  Hopefully not too late. On 03-Dec-20 17:38, Daniel Stenberg wrote:On Thu, 3 Dec 2020, Timothe Litt via curl-library wrote: > > Thanks Timothe, you really took this further! > >>    int curl_easy_getopt(CURL *handle, CURLoption option, size_t >>    bufs

Re: curl_easy_cmdline ?

2020-12-03 Thread Daniel Stenberg via curl-library
On Thu, 3 Dec 2020, Timothe Litt via curl-library wrote: Thanks Timothe, you really took this further! int curl_easy_getopt(CURL *handle, CURLoption option, size_t bufsize, void *buffer) Returns any settable option's current value in buffer, with the same type as curl_easy_

Re: curl_easy_cmdline ?

2020-12-03 Thread Timothe Litt via curl-library
As others have pointed out, blurring the division between the command line tool and the library has significant architectural and practical disadvantages. I think there is a better approach.  Here is a rough outline. I suggest implementing some more generally useful functions: int curl_easy_

Re: curl_easy_cmdline

2020-12-02 Thread Zakrzewski, Jakub via curl-library
On Wed, 2 Dec 2020, Daniel Stenberg wrote: > To me, that's probably one of the bigger philosophical concerns about this > idea. curl uses libcurl, libcurl doesn't know about curl. > But then nobody else than libcurl knows exactly what has been set for a > transfer so only libcurl itself can do a

Re: curl_easy_cmdline

2020-12-02 Thread Daniel Stenberg via curl-library
On Wed, 2 Dec 2020, Patrick Schlangen wrote: As especially in embedded environments it might be a goal to keep the library footprint as low as possible, how about adding a compile time option to be able to toggle this feature on/off, with default being 'on'? These days, almost every (larger)

Re: curl_easy_cmdline ?

2020-12-02 Thread Tetetest via curl-library
Hello Daniel, Wednesday, December 2, 2020, 12:24:22 PM, you wrote: DS> There are probably tens of thousands of authors in the world who are writing DS> applications using the libcurl API. In C, PHP, Python, perl, R and other DS> languages. Here are some points to discuss: Pros: 1. I can see on

Re: curl_easy_cmdline

2020-12-02 Thread Patrick Schlangen via curl-library
Am 02.12.2020 um 10:24 schrieb Daniel Stenberg via curl-library : > >> This function will be dead code for any application using libcurl - except >> for curl itself. > > There are probably tens of thousands of authors in the world who are writing > applications using the libcurl API. In C, PHP

Re: curl_easy_cmdline ?

2020-12-02 Thread Daniel Stenberg via curl-library
On Tue, 1 Dec 2020, Tetetest via curl-library wrote: DSvcl> Here's an idea: a function that can return the equivalent curl command line DSvcl> based on the options set in the easy handle! IMO it belongs to curl code, not to curl-library. Not at all. The curl tool already knows exactly which

Re: curl_easy_cmdline ?

2020-12-02 Thread Daniel Stenberg via curl-library
On Wed, 2 Dec 2020, Christian Schmitz wrote: I would rather like to see a curl_easy_getopt to get the properties and then have our app walk over list of properties and query each value to print it to console. To me, that's an entirely different idea/suggestion that also means that *every* ap

Re: curl_easy_cmdline ?

2020-12-02 Thread Christian Schmitz via curl-library
> Am 01.12.2020 um 16:29 schrieb Daniel Stenberg via curl-library > : > > Hi, > > Here's an idea: a function that can return the equivalent curl command line > based on the options set in the easy handle! > > For debugging and more. > Great idea. I would rather like to see a curl_easy_ge

Re: curl_easy_cmdline ?

2020-12-01 Thread Tetetest via curl-library
Hello Daniel, Tuesday, December 1, 2020, 6:29:12 PM, you wrote: DSvcl> Here's an idea: a function that can return the equivalent curl command line DSvcl> based on the options set in the easy handle! IMO it belongs to curl code, not to curl-library. This function will be dead code for any applic

Re: curl_easy_cmdline ?

2020-12-01 Thread Daniel Stenberg via curl-library
On Tue, 1 Dec 2020, James Read wrote: https://github.com/curl/curl/wiki/curl_easy_cmdline Sounds useful. Is it doable? Absolutely. It can't really do a 100% conversion, but could probably be close enough for most setups... -- / daniel.haxx.se | Commercial curl support up to 24x7 is

Re: curl_easy_cmdline ?

2020-12-01 Thread Zakrzewski, Jakub via curl-library
> Thoughts? Just one: Amazing idea! :) --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html

Re: curl_easy_cmdline ?

2020-12-01 Thread James Read via curl-library
On Tue, Dec 1, 2020 at 3:34 PM Daniel Stenberg via curl-library < curl-library@cool.haxx.se> wrote: > Hi, > > Here's an idea: a function that can return the equivalent curl command > line > based on the options set in the easy handle! > > For debugging and more. > >https://github.com/curl/curl