Open greenbergjosh opened 4 years ago
I would like to see something like the above created and placed into open source. I am willing to fund that effort if anyone would like to work on the project either as a full time member of my team or as a contractor. Please reply here if there is any interest.
I apologize if this is not the correct place for this question, but I did not find a better alternative.
I would like to use curl from a C# application. I see I can use CurlThin, which is great, but I was wondering if there might be a different interface that I am missing.
It would be amazing to be able to something like var x = await curlthin.cmd("curl -O ftp://speedtest.tele2.net/1MB.zip");
It would be even more amazing to be able to get back the stream instead of having the result always written to a file var stream = await curlthin.cmd("curl -O ftp://speedtest.tele2.net/1MB.zip", getBackStream=true);
I am actually asking for a few different things, and then really asking if something like this is possible without rewriting a lot of code.
The whole key to what I am suggesting/asking is whether there is a way to leverage the command line syntax of curl without having to recreate all of it. Then, if that is possible, is there a way to do so that is async and can provide easy access to the resultant stream. That would really be like curl is in my C# application as opposed to libcurl. The value of the curl command line cannot be overstated. It is a widely used an accepted syntax. To be able to drop it directly into a function call would be huge. To be able to have that function either write to a file, or to yield back a stream, would make integration a snap. That way, when I want to grab a file from an ftp and write it to my local filesystem, it's simple. And, when I want to make an HTTP POST and get back the response stream, it's equally simple. Plus, I don't have to rewrite the command line parser that curl has already written and perfected.
Thank you for any advice or thoughts on whether this can be done or how I might approach it. It would be fantastic if I just missed this in the API docs for curlthin or if there is some other project that works along with curlthin to support this.
Kind Regards