我有一个python代码。我需要vb.net版相当于它。在
提前谢谢。在
payload2 = {"auth_token": "YOUR_AUTH_TOKEN", "status":"green", "data-title1":"index", "data-title2":"machine1", "data-title3":"package10", "data-title4":"current", "data-title5":"tmp"}
r=requests.post("http://localhost:3030/widgets/hot21",data=json.dumps(payload2))
额外信息 代码在“UiPath community edition”中调用
最后一个代码(感谢JussiV)是
^{pr2}$最后的错误消息是
webservice has thrown an exception
Source: Invoke code
Message: Error compiling code
error BC30035: syntax error. At line 1
error BC30561: 'Formatting' is ambiguous, imported from the namespaces or types 'Newtonsoft.Json, System.Xml'. At line 10
error BC30002: Type 'WebClient' is not defined. At line 12
error BC30451: 'Encoding' is not declared. It may be inaccessible due to its protection level. At line 18
error BC30451: 'Encoding' is not declared. It may be inaccessible due to its protection level. At line 20
Exception Type: ArgumentException
在中创建词典VB.net版https://www.dotnetperls.com/dictionary-vbnet:
那么post the dictionary as JSON:
^{pr2}$编辑:
您至少缺少具有
WebClient
类的System.Net
的导入。我不确定您导入Newtonsoft.Json
的位置/方式,因为我在您的导入中没有看到它,但是基于它被导入到某个地方的错误。在对于不明确的导入,请参阅this answer以解决不明确的导入。在
相关问题 更多 >
编程相关推荐