     url += privateKey;
     url += '/';
     
-String data = "alive=true";
-client.print(String("POST ") + url + " HTTP/1.1\r\n" +
-                 "Host: " + host + "\r\n" +
-                 //"Connection: close\r\n" +
-                 //"Content-Type: application/json\r\n" +
-                 "Content-Type: application/x-www-form-urlencoded\n"+
-                 "Content-Length: " + data.length() + "\r\n" +
-                 "\r\n" + // This is the extra CR+LF pair to signify the start of a body
-                 data + "\n");
-    
-
-  // This will send the request to the server
-  client.print(String("GET ") + url + " HTTP/1.1\r\n" +
-               "Host: " + host + "\r\n" + 
-               "Connection: close\r\n\r\n");
+String PostData = "alive=true";
+  client.println("POST /GnomeAPI/getGnomeStatus/QAZ123 HTTP/1.1");
+  client.println("Host: gnome-home.herokuapp.com/");
+  client.println("User-Agent: Arduino/1.0");
+  client.println("Connection: close");
+  client.println("Content-Type: application/x-www-form-urlencoded;");
+  client.print("Content-Length: ");
+  client.println(PostData.length());
+  client.println();
+  client.println(PostData);
   unsigned long timeout = millis();
   while (client.available() == 0) {
     if (millis() - timeout > 5000) {

  }

  digitalWrite(ledPin, ledState);
  Serial.println(line);
  
}


#include <ESP8266WiFi.h>

const int ledPin =  14; 
const char* ssid     = "NCC";  //local network
const char* password = "";
const char* host = "gnome-home.herokuapp.com"; //development server
const char* privateKey = "ZXC123";

int onOffStatus = 0;
