1

I am trying to make a REST call from within Azure Functions. For these lines of code:

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

I get the following error.

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

I am using the web interface in Azure.com.

1 Answer 1

6

You are probably missing a proper reference to System.Web:

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

See Referencing External Assemblies.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for quick reply, I have the proper references. This post, stackoverflow.com/questions/2405182/… is close, but I do not know how to specify the full framework in Azure Functions.
Function App always targets full framework... I have your code compiling successfully in my function...
Thanks @Mikhail, can you explain the #r "System.Web" or link to some documentation
@Ryan Added the link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.