Quantcast
Channel: Arduino Forum - Latest topics
Viewing all articles
Browse latest Browse all 16055

ESP8266 Arduino IDE Detection of end of HTTP header

$
0
0

Hello, I have a file that resides on my website it is HTTPS enabled.
The file is a simple ascii text file containing text.
I want to read the file via ESP8266 12F module.
I have it connecting ok using wifisecureclient.
But when trying to read the file I get back all the HTTP header text.
I have read that the HTTP header ends with /r/n/r/n
I have used various methods to try and detect this, but all have failed.

while (client.connected()) {
  String line = client.readStringUntil('\n');
  if (line == "\r\n") break;    //if line contains only "\r\n", it's the end of headers
}

Does not work for me. are there other methods. if there are keep it simple like me. Thank you.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 16055

Latest Images

Trending Articles



Latest Images