通过查看Autodesk.Forge参考特性,我发现了一个名为CallApiAsync()的方法,我要使用该方法发送请求,例如GET Autodesk BIM360项目的特性。
下面是CallApiAsync()使用的参数,但是有没有人能解释一下它们是什么,以及如何null我不需要的参数?
CallApiAsync(string path,
RestSharp.Method method,
System.Collections.Generic.Dictionary<string, string> queryParams,
object postBody,
System.Collections.Generic.Dictionary<string, string> headerParams,
System.Collections.Generic.Dictionary<string, string> formParams,
System.Collections.Generic.Dictionary<string, RestSharp.FileParameter> fileParams,
System.Collections.Generic.Dictionary<string, string> pathParams,
string contentType)发布于 2019-01-21 18:53:50
如果您查看源代码here,它实际上不会检查null或回退到任何默认值,因此您需要为不需要的参数提供空值,例如
CallApiAsync(“Your:Api/path/”, Method.GET, new Dictionary<string,string>(), new {}, ...)https://stackoverflow.com/questions/54286359
复制相似问题