Hello,
I am trying to access and send data to an easy table i created in an azure app service with a genuino mkr1000. I am succesfully connecting to the server but i dont know how i will reach the table...
does anybody have an idea?
Here's the code trying to reach the table...
//////////////////////
char buffer[64];
void send_request(int value)
{
Serial.println("\nconnecting...");
Serial.print("sending ");
Serial.println(value);
// POST URI
sprintf(buffer, "POST /tables/%s HTTP/1.1", table_name);
client.println(buffer);
// Host header
sprintf(buffer, "Host: %s", server);
client.println(buffer);
// JSON content type
client.println("Content-Type: application/json");
// POST body
sprintf(buffer, "{"value": %d}", value);
// Content length
client.print("Content-Length: ");
client.println(strlen(buffer));
// End of headers
client.println();
// Request body
client.println(buffer);
}