title: server.args() ESP8266 Arduino
body: <p>I am using the ESP8266 with Arduino IDE and have set up a server at port 200 . The IP is also defined as the same as 192.168.1.100.</p>
  
  <pre><code>ESP8266WebServer server(200);
  IPAddress ip(192, 168, 1, 100); //Node static IP
  IPAddress gateway(192, 168, 1, 1);
  IPAddress subnet(255, 255, 255, 0);
  
  
  server.on("/parseIFTTT", parseIFTTT); 
  
  
  void parseIFTTT() {
  
    String message;
    message += server.args();
    message += "\n";
    for (uint8_t i = 0; i &lt; server.args(); i++) {
      message += " " + server.argName(i) + ": " + server.arg(i) + "\n";
    }
    Serial.println(message);
    Serial.println(server.argName(0));
    Serial.println(server.arg(0));
    server.send(200, "text/plain", "Success  " + message);
  }
  </code></pre>
  
  <p>is done to route the parseIFTTT request to this parseIFTTT() method.</p>
  
  <p>I have done port forwarding and using the duckdns to access this server from outside. 
  This is my duckdns address </p>
  
  <pre><code>http://xxxxxx.duckdns.org:200/parseIFTTT
  </code></pre>
  
  <p>When I make a POST using a POSTMAN tool with content type as text/plain , the body contents are shown in the serial monitor as </p>
  
  <pre><code>plain
  --body contents--
  </code></pre>
  
  <p>But when the same request is made from IFTTT the serial monitor shows nothing but plain as empty .Initially I felt the issue is with IFTTT. 
  But that is not the issue as when I use the WiFiWebServer example in the arduino , using the following code</p>
  
  <pre><code>  String req = client.readString();
    Serial.println(req);
    client.flush();
  </code></pre>
  
  <p>I see the data from IFTTT as :</p>
  
  <pre><code>POST /parseIFTTT HTTP/1.1
  Content-type: text/plain
  host: xxxxxx.duckdns.org:200
  content-length: 27
  x-newrelic-id: XAMGV15QGwQJVllRDgQ=
  x-newrelic-transaction: PxQFA1NbAQQJVwJWA1dSB0YdUFIOFQZOEgEPVA5ZBFYGXAwECFgFAFcUG0MHUwoLBAcDAxVs
  Connection: close
  
  {"value":"test data from IFTTT"}
  </code></pre>
  
  <p>So I believe I am doing something wrong with the server.args(). I am under the impression that server.args() should give the body contents used in the POST whether contentType is text/plain or x-www-form-urlencoded.</p>
  
  <p>Am I doing something wrong or with the server.args() can't we get the body data from the POST request ?</p>