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

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

php - facebook and github login HWIOAuthBundle and FOSUserBundle in Symfony2.1 -

hadoop - Sqoop installation export and import from postgresql -