2017-03-31 120 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