[英]simple cURL request with RESTSharp
I want to execute a simple cURL command with c# 我想用C#执行一个简单的cURL命令
curl https://doma.in/to/verify/license \
-d "produkt=test01" \
-d "key=123123123123" \
-X POST
What is what is the equivalent to C# or RESTSharp? 什么是C#或RESTSharp? I tried this: 我尝试了这个:
var client = new RestClient("https://doma.in");
var request = new RestRequest("/to/verify/license", Method.POST);
But I don't know how to translate this to RESTSharp: 但是我不知道如何将其转换为RESTSharp:
-d "produkt=test01" \
-d "key=123123123123" \
-X POST
Manpage of cURL says '-d' is for send data but I can't find a send data tag for RESTSharp. cURL的联机帮助页说“ -d”用于发送数据,但是我找不到RESTSharp的发送数据标签。 How can I translate this code to c#? 如何将此代码转换为C#? And how can I save the answer? 以及如何保存答案?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.