I need to run an HTTP Client on the MOD5270 board. I see there is support for HTTP server processing and FTP server and client but I don't see an HTTP Client. Has anyone developed a simple library for doing an HTTP POST and HTTP GET from the NetBurner boards?
I noticed the TCP stuff makes it easy to open a port on a remote server but doesn't have any helper functions for sending GET and POST data.
HTTP Client
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: HTTP Client
See:
C:\Nburn\docs\NetworkProgrammersGuide\NNDKProgMan.pdf cha[ters 8 and 9
also: C:\Nburn\examples\Web
C:\Nburn\docs\NetworkProgrammersGuide\NNDKProgMan.pdf cha[ters 8 and 9
also: C:\Nburn\examples\Web
Re: HTTP Client
What helper functions do you need? Once you have a TCP socket open to port 80, send GET\n\n (2 newlines) for index.htm, and specify the file for anything else. You can use wireshark to get packet captures using a web browser if you want to get it exactly identical. Just use a writestring() function. Just remember the server will terminate the tcp socket once the data has been sent.
Re: HTTP Client
I remembered an example of this. Check out the weather demo at http://www.netburner.com/demonstration/ ... ation.html. It gets data from a NOAA web server by doing a GET request.
Re: HTTP Client
Thanks for the tips. I looked up the format of the HTTP GET and POST request/response text and it looks easy enough to handle using the writestring() method. Coming from a Java server based environment, I'm a little spoiled with all the higher level classes and functions.
Does anyone know where to download the Weather example? I looked in my nburn\examples directory and the Weather example doesn't exist. Every other one on that page does, just not the Weather one. Maybe it didn't come with the MOD5270 installer?
Does anyone know where to download the Weather example? I looked in my nburn\examples directory and the Weather example doesn't exist. Every other one on that page does, just not the Weather one. Maybe it didn't come with the MOD5270 installer?
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: HTTP Client
http://www.netburner.com/demonstration/ ... ation.html
Or at Netburner.com site, SUPPORT menu EXAMPLE APPLICATIONS
Or at Netburner.com site, SUPPORT menu EXAMPLE APPLICATIONS