我正在尝试在我的 .NET 项目中使用高级请求,但遇到异常
System.SystemException: 'AdvancedRequestSupporter 函数中的 ServiceCode 错误:advancedRequest 在 11: http.requestCall $L1 $L0 '</p>
InvalidCastException:无法将“System.Collections.Generic.Dictionary2[System.String,System.String]”类型的对象转换为“System.Collections.Generic.Dictionary2[System.String,System.Object]”类型。
代码:AdvancedRequestSpecification req = new AdvancedRequestSpecification("/pubapi/v1/properties/namespace"); req.SetMethod(“POST”); 字典正文 = new Dictionary(); 身体[“测试”] = 55;req.SetBodyStringifyJson(body) ;
// Specify the headers
Dictionary<String, string> headers = new Dictionary<String, string>();
headers["Content-Type"] = "application/json";
req.SetHeaders(headers);
AdvancedRequestResponse res = AdvancedRequest(req);
即使我没有设置正文或标题,我也会收到此异常
所以像 AdvancedRequestSpecification req = new AdvancedRequestSpecification("/pubapi/v1/properties/namespace"); req.SetMethod(“POST”); AdvancedRequestResponse res = AdvancedRequest(req);
谁能帮忙?我忘了提到我尝试过使用 Box 和 egynte