HTTP client is giving wrong results..

hello there,

I have a java server on local host, that sets the status of LCD either 0 or 1. the resource URI is: http://localhost/mytrain/restserver/train/lcd and the content of the page is: {"lcdStatus": 0} or {"lcdStatus":1}

I'm trying to make my Arduino HTTP client reads it, and depending on the value 0 or 1 to control an LCD. But it's not working.. When it gives an answer, then it's ÿ

Could anyone please help me here? what should I write in the GET request? My Arduino is Mega 2560, with Ethernet shield

thanks in advance

post your code

localhost = 127.0.0.1 is an internal loopback device address, you must use the external NIC number, e.g. 192.168.1.10

http://192.168.1.10/mytrain/restserver/train/lcd

give it a try

thanks, you're right.. However I must enter credentials, user name and password.. How to do this in Arduino code?

carefully?

Google for POST (although it can need another protocol)

thanks! great idea! didn't know that one could use POST in Arduino! I found this.. http://forum.arduino.cc/index.php?topic=155218.0 I'll see how I can use it in my code..