如何从C#应用程序调用curl
问题描述:
我有这个卷曲请求,我已经能够从各种教程中拼凑出来,但它确实有效,但我需要能够用C#来完成它。
curl -K myconfig.cfg http:// myserver / servlet从stdin读取配置文件
其中myconfig.cfg是一个带有名字的配置文件/价值对
我没有代码可以查看,因为我不知道从哪里开始。
有没有人有任何关于如何使用c#web request实现相同行为的教程?
I have this curl request which I've been able to cobble together from various tutorials, and it works, but I need to be able to do it in C#.
curl -K myconfig.cfg http://myserver/servlet which reads config file from stdin
where myconfig.cfg is a configuration file with some name/value pair
I have no code to look at, as I have no idea where to start.
Does anyone have any tutorial on How can it be implemented the same behavior using c# web request?
答
Curl不是命令,它是可执行文件。但也是一个图书馆!你最好找一下这个库的包装器。像这样: https://github.com/masroore/CurlSharp [ ^ ],你可能会发现更多。
Curl is not a command, it is an executable. But also a library! You better look for a wrapper around that library. Like this one: https://github.com/masroore/CurlSharp[^], bout you might find more out there.