I am trying to send data from arduino to my local system which is running a iis server and c# web api application and exposes a get request
the api on system looks like this http://localhost/iot/data.asmx/GetData?tagid=123456 and it works correctly.
now i am trying to run a bare minimum ethernet client to send this test data to the server, the code
if (client.connect("http://192.168.1.2", 80)) {
Serial.println("connected");
client.print("GET /iot/data.asmx/GetData?tagid=123568");
client.println();
client.println(" HTTP/1.1 ");
client.println("Host: 192.168.1.2");
client.println("Content-Type: application/x-www-form-urlencoded");
client.println();
client.stop();
}
the serial output prints connected but then nothing happens. the data is not getting logged in the server.
i hope this should be a straight forward one, but i am completely unable to find anything, neither the api is throwing an error nor the arduino.
any idea?
P.s i switched off the firewall also.