2017-03-31 96 views
0

我正在尝试从Azure函数内部进行REST调用。对于这些代码行:从Azure函数内部调用HttpUtitility

var client = new HttpClient(); 
var queryString = HttpUtility.ParseQueryString(string.Empty); 

我得到以下错误。

The name 'HttpUtility' does not exist in the current context 

我正在使用Azure.com中的Web界面。

回答

3

你可能缺少正确的参考System.Web

#r "System.Web" 
using System.Web; 

Referencing External Assemblies

+0

感谢您的快速回复,我有适当的参考。这篇文章,http://stackoverflow.com/questions/2405182/httputility-does-not-exist-in-the-current-context接近,但我不知道如何在Azure函数中指定完整的框架。 – Ryan

+0

函数应用程序始终以完整框架为目标...我已经在我的函数中成功编译了代码... – Mikhail

+0

感谢@Mikhail,你能否解释#r“System.Web”或链接到某些文档 – Ryan