HTTP POST

Questions specifically related to the TCP/IP stack that interfaces with the driver.

HTTP POST

Postby parkerkrhoyt » Thu Dec 31, 2009 10:00 am

I've found and successfully used the WebClient for HTTP GET (thanks Greg), but now I'm wondering if it would be feasible to use HTTP POST? Specifically I'd like to upload an image captured from a camera...

http://gizmologi.st/2009/04/taking-pict ... h-arduino/

I'm guessing that I'd drop to the lower level uIP implementation and then just send the right headers/bytes at the right time, but I'm not entirely sure where to start. I've been browsing various aspects of the WiShield driver/uIP implementation source code on Git, but without documentation proper, I'm not sure what classes to use to emulate HTTP. Any pointers?

Thanks,
Kevin
parkerkrhoyt
 
Posts: 8
Joined: Fri Nov 27, 2009 7:55 pm

Re: HTTP POST

Postby GregEigsti » Thu Dec 31, 2009 10:48 am

Your code for HTTP GET *should* work for a POST; really the only difference is the request data that you send to the server. I think my pachube example uses a POST (or feigns it with a GET) - or something like that ;) Just looked at it and it does a PUT via POST - so go take a look at that sample and it will get you most of the way there.
http://asynclabs.com/forums/viewtopic.php?f=15&t=86&start=10
Greg
Check out the wiki!
uIP Stack Docs
Compatible Access Point List
WiShield user contrib branch - DNS, DHCP, AP Scanning, bug fixes, etc.
SlackLab.org - My geek projects blog.
User avatar
GregEigsti
 
Posts: 1067
Joined: Sun Aug 02, 2009 5:23 pm
Location: Sammamish WA USA (near Seattle)
  • Website


Return to TCP/IP Stack

Who is online

Users browsing this forum: No registered users and 1 guest