I'm trying to take the contents of the buffer and insert it into HTML code. What is in the buffer is a line of text that will end up being a link to a webpage. I tried the following but it prints the word buffer on the webpage not the contents. Thanks
in general it is bad idea to use HTML text in the sketch, better use SPIFFS to store it and if needed you could use processor functions in WebServer libraries to get what you want
I'm not sure how to use what @noiasca suggested with client.print.
But this worked in the void loop section client.print("<a href=\"/2\">" + buffer + "</a><br><br>");
and this in the void setup section buffer = titlesFile.readStringUntil('\n');
Only problem with that is it's use of the String class. Prevailing dogma in these parts is that will fragment you're heap space and cause a catastrophic stack collision. A bit over state perhaps. But if you're using an AVR-based board it's something to consider. If you're on an ARM or ESP with more resources, knock yourself out.