如何从C#应用程序调用curl [英] How to call curl from C# application

查看:723
本文介绍了如何从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.


这篇关于如何从C#应用程序调用curl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆