Pages: [1]   Go Down
Author Topic: HTTP Post with Ethernet Sheild  (Read 497 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've done some searching and had no luck.

I've used the Ethernet shield before successfully, but I'm looking to scrape an HTML page requested with POST data. Just a few simple variables, nothing that will stress the Arduino, and the reply is only a few lines of barely marked up text.

That said, it sounds like the Ethernet library can do a POST request (or if not, the HTTP Client Library seems to)

Unfortunately, I can't seem to find a good tutorial from anyone who has put together such code. Can anyone point me in the correct direction?
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 111
Posts: 5250
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Ethernet library knows nothing about HTTP but the HTTP Client Library you linked to does. Within the library folder you find an example folder containing the  PachubePush example. Although there the PUT method is used, the POST method is used almost identically, it just uses postURI instead of putURI.
Logged

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9699
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you already have working client POST code, then the below textfinder code might get the desired info from the returned stream. Not knowing what is returned somewhat limits suggestions.

http://playground.arduino.cc/Code/TextFinder
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Pages: [1]   Go Up
Jump to: