Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/312.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# 如何使用Fiddler在post方法中将值传递给字符串数组?_C#_Web Services_Rest_Post_Fiddler - Fatal编程技术网

C# 如何使用Fiddler在post方法中将值传递给字符串数组?

C# 如何使用Fiddler在post方法中将值传递给字符串数组?,c#,web-services,rest,post,fiddler,C#,Web Services,Rest,Post,Fiddler,当我在Fiddler中传递值时,比如{“rajehs”,“ramesh”,“ramsgkfhh”},我会得到[0]位置的所有值。我还尝试使用={“rajehs”、“ramesh”、“ramsgkfhh”} 我声明了如下方法: public void Post([FromBody]string[] value) { } 您在我们的体内传递的是一个JSON对象,而不是数组。使用[]传递JSON数组: ["rajehs","ramesh","ramsgkfhh"] 刚刚收

当我在Fiddler中传递值时,比如
{“rajehs”,“ramesh”,“ramsgkfhh”}
,我会得到[0]位置的所有值。我还尝试使用=
{“rajehs”、“ramesh”、“ramsgkfhh”}

我声明了如下方法:

    public void Post([FromBody]string[] value)
    {

    }

您在我们的体内传递的是一个JSON对象,而不是数组。使用
[]
传递JSON数组:

["rajehs","ramesh","ramsgkfhh"]

刚刚收到,,,无论如何,谢谢你的快速回复