title: ESP8266 and POST request
body: <p>I have an ESP8266, which I'm programming in Arduino. I need make a POST request. I tried this code:</p>
  
  <pre><code>#include &lt;ESP8266HTTPClient.h&gt;
  #include &lt;ESP8266WiFi.h&gt;
  
  void setup() {
  
    Serial.begin(115200);                                  //Serial connection
    WiFi.begin("ssid", "wifi_password");   //WiFi connection
  
    while (WiFi.status() != WL_CONNECTED) {  //Wait for the WiFI connection completion
  
      delay(500);
      Serial.println("Waiting for connection");
  
    }
  }
  
  void loop() {
  
    if(WiFi.status()== WL_CONNECTED){   //Check WiFi connection status
  
      HTTPClient http;    //Declare object of class HTTPClient
  
      http.begin("server_name");      //Specify request destination
      http.header("POST / HTTP/1.1");
      http.header("Host: server_name");
      http.header("Accept: */*");
      http.header("Content-Type: application/x-www-form-urlencoded");
      int httpCode = http.POST("Message from ESP8266");   //Send the request
      String payload = http.getString();                                        
      Serial.println(httpCode);   //Print HTTP return code
      Serial.println(payload);    //Print request response payload
      http.end();  //Close connection
  
    }else{
  
      Serial.println("Error in WiFi connection");   
  
    }
  
    delay(5000);  //Send a request every 30 seconds
  
  }
  </code></pre>
  
  <p>But on the web page I did not receive any response.</p>