Pages: [1]   Go Down
Author Topic: Help with ethernet client  (Read 549 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey everyone,

I'm using an ehternet shield with an uno board to send some reports to a cloud application.
Here's a part of the code that i made in java to do that:

URLConnection cloudConnection = cloudServer.openConnection();

I want to know how to do the setRequestProperty method on arduino c/c+ language. Any thoughts?

Best regards

Miramar Beach, Florida
Offline Offline
Faraday Member
Karma: 150
Posts: 6130
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Generally, those are sent in the request header.

client.println("GET /mypage.html HTTP/1.1");
client.println("Connection: close");
client.println("Any other header stuff you want to send");
// signal end of header with a blank line
client.println("Any data you want to send");

...and the server returns stuff in it's header just about like that. The server header ends with a blank line also.
« Last Edit: February 10, 2012, 07:47:17 am by SurferTim » Logged

Pages: [1]   Go Up
Jump to: