Go Down

Topic: Help with ethernet client (Read 606 times) previous topic - next topic


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:

Code: [Select]

URLConnection cloudConnection = cloudServer.openConnection();

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

Best regards


Feb 10, 2012, 01:34 pm Last Edit: Feb 10, 2012, 01:47 pm by SurferTim Reason: 1
Generally, those are sent in the request header.

Code: [Select]
client.println("GET /mypage.html HTTP/1.1");
client.println("Host: www.mydomain.com");
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.

Go Up