The type or namespace name ‘HttpWebRequest’ could not be found (are you missing a using directive or an assembly reference?)
What am I doing wrong?
As I understand it, the GHI world has its own implementation of HttpWebRequest and related… but where?
I was using “System.Net.HttpWebResponse” and this does not work in Panda land.
I poked around, and did not find it in the new world…
Pseudo code:
using System;
using System.Threading;
using System.IO;
using System.Text;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;
using GHIElectronics.NETMF.Hardware;
using GHIElectronics.NETMF.Net;
using GHIElectronics.NETMF.Net.NetworkInformation;
using (var request = (HttpWebRequest)WebRequest.Create(requestUri))
I looked ALL OVER for this,and do believe that the HTTP GET examples fail to call this out. (fwiw, I had networking running on a netduino in zero time, but spent a couple hours to get to the same point on panda…)
There is definitely a learing curve on NETMF devices compared to Arduino, but one advantage NETMF offers is upward scalability. GHI offers the Panda II, but also offers more powerful controllers like the Cobra, EMX, Spider, and Hydra, that just aren’t available on the Arduino platform. Programs you write for the Panda can be easily ported to higher level platforms if you need the extra ROM, RAM, or CPU power.
As you may know, using wiznet on panda was selected to give users a lot more free memory. Having built in stack would have left the device with very little memory making it near useless.
Cobra, hydra, spider use standard built in netmf stack, BTW.
As far as I know http class is not supported with Netduino. Are the examples you are mentioning use networking sockets? In another word, adding uisng system.http in neduino does not work.
Are the examples you are mentioning use networking sockets?
No. There are netduino examples based on sockets, but I have not used them. I have only (so far) used the high level netrequest/netresponse.
The code I posted above works just as you see it on the netduino. Straight from the “internet of things” book. I must say, my experience networking on the netduino was GREAT. I just grabbed the examples from the “internet of things” book, tweaked em to hit my web service, and they just worked. Absolutely no screwing around at all.
I have 4+ hours into screwing around with panda and the GHI ethernet shield, and have no joy at all. (see my other thread in this forum on this topic).