c# - The type or namespace name 'Http' does not exist in the namespace 'System.Net' -


i developing handset application in .net framework 3.5,which using api service call check email address website.i using below code perform that,

using system.net.http;  httpclient webclient = new httpclient(); webclient.querystring.add("email", email); stream stream = webclient.openread(brandendpoint); 

initially used webclient instead of httpclient , got error "the type or namespace name 'webclient' not found" google , fixed httpclient.

after replacing webclient httpclient getting error "the type or namespace name 'http' not exist in namespace 'system.net".

need solve this.

thanks

httpclient available in .net 4.5 or 4.0 microsoft.net.http nuget package. isn't @ available .net 3.5.

httpclient uses features tpl available in .net 4+.

you'll have use either system.net.webclient or webrequest. if compilation errors, make sure you've added proper using statements. these 2 classes available since .net 1.1, in system.dll library , available.


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -