Arduino Uno + ESP8266 reading server's response
<p>I'm sending a GET request from Arduino Uno using ESP8266. The request is sent, but I'm unable to print the received response.</p>

<p>I'm using code from <a href="https://elementztechblog.wordpress.com/2015/05/13/esp8266-based-temperature-data-logger-using-arduino/" rel="nofollow noreferrer">https://elementztechblog.wordpress.com/2015/05/13/esp8266-based-temperature-data-logger-using-arduino/</a></p>

<p>I have changed the code for connecting to my server and I can see the GET request is received on my server's log.</p>

<p>I tried putting</p>

<pre><code> while (ser.available())
 {
     Serial.write(ser.read());
 }
</code></pre>

<p>after the <code>Serial.println("AT+CIPCLOSE");</code> statement.</p>

<p>BUT I'm not getting anything on Serial monitor after <code>"AT+CIPCLOSE"</code></p>

<p><strong>EDIT:</strong>
Here's my entire code:</p>

<pre><code>// connect 10 to TX of Serial USB
// connect 11 to RX of serial USB
SoftwareSerial ser(10, 11); // TX, RX

// this runs once
void setup()
{

    // enable debug serial
    Serial.begin(9600);
    // enable software serial
    ser.begin(9600);

    // reset ESP8266
    ser.println("AT+RST");
}
// the loop
void loop()
{

    // TCP connection
    String cmd = "AT+CIPSTART=\"TCP\",\"";
    cmd += "192.168.0.25"; 
    cmd += "\",3000";
    ser.println(cmd);

    if(ser.find("Error"))
    {
        Serial.println("AT+CIPSTART error");
        return;
    }

    // prepare GET string
    String getStr = "GET /api/myservice";

    getStr += "\r\n\r\n";

    // send data length
    cmd = "AT+CIPSEND=";
    cmd += String(getStr.length());
    ser.println(cmd);

    if(ser.find("&gt;")){
    ser.print(getStr);
}
else
{ 
    ser.println("AT+CIPCLOSE");
    // alert user
    Serial.println("AT+CIPCLOSE");

    // CODE I FOUND FOR READING THE REPLY FROM SERVER:
    while (ser.available())
    {
         // char c = ser.read();
         Serial.write(ser.read());
         // if (c == '\r') Serial.print('\n');
    }
}

delay(1000);
}
</code></pre>

<p><strong>ESP Details:</strong></p>

<p>ESP-01</p>

<p>AT version: 0.40.0.0</p>

<p><a href="https://i.stack.imgur.com/fxIcv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fxIcv.jpg" alt="enter image description here"></a></p>