Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何使用Leaf.xNets HttpRequest在Post请求中使用正文?_C#_Http_Request_Leaf - Fatal编程技术网

C# 如何使用Leaf.xNets HttpRequest在Post请求中使用正文?

C# 如何使用Leaf.xNets HttpRequest在Post请求中使用正文?,c#,http,request,leaf,C#,Http,Request,Leaf,我正在尝试使用Leaf.xNet向我的HttpRequest添加一个主体。 这是我的代码: HttpRequest req = new HttpRequest(); req.ConnectTimeout = 5000; req.Get($"https://httpbin.org/"); 在帖子中添加了正文(不是GET,请参见:)

我正在尝试使用Leaf.xNet向我的HttpRequest添加一个主体。 这是我的代码:

HttpRequest req = new HttpRequest();
req.ConnectTimeout = 5000;

req.Get($"https://httpbin.org/");
在帖子中添加了正文(不是GET,请参见:)