Main Site Documentation

How to access webclient in gadgeteer app?


#1

Hello

I want to send files to a webserver from flash memory and to do it I want to use WebClient

when I Type WebClient I only get access to Gadgeteer.Networking.WebClient
which only has one method GetFromWeb("") !

How can I access WebCLient in the System.Net name space ?
when I type System.Net. after . I can’t get access to WebClient although I have added reference to System.Net :frowning:
I want to do the following :

var wClient = new System.Net.WebClient(); 
                var _Values = new System.Collections.Specialized.NameValueCollection (); 
               _Values.Add("Data" , Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("Hi ! :)")));
            Response.Write(System.Text.Encoding.UTF8.GetString(wClient.UploadValues(@ "http://localhost:10058/API.aspx", _Values))); 
            Response.End();

thx in advance


#2

That is only in the full .NET Framework not in the micro framework. Here is what is available
http://msdn.microsoft.com/en-us/library/hh422803.aspx

I use toolbox


For talking to web servers.

I filed some issues on it which have not been addressed yet, but it might work for you as is.