I can't seem to get all of the data being sent to wifi module from a webpage, I assume it's a buffering issue but I can't figure out which buffer.
At first I was trying to read and then print it back to the webpage, but that wasn't quite working.
Lately I've been using the DigiKeyboard to print it to my desktop, which has had a lot more success.
I'm working off the server example and some of the features work the way they should, for example when starting out
Serial.readStringUntil(' '); will find the GET message, and running it again will get my the requested address, but then things are pretty garbled after that.
I've tried a few loops using:
do {
DigiKeyboard.println((char)Serial.read());
} while(Serial.peek() != -1);
And what I've noticed is that it's returning a -1 (empty) pretty quick even if there is still a ton of data left to read.
Now here is where it gets weird: my goal is to be able to send POST requests from the webpage, which means sending a chunk of data buried in the html message, instead of relying on the address part which GET uses. In my test example I was sending a first and last name so the data looked like fname=Bob&lname=Smith.
The problem is that part of the message is pretty deep, and until now I couldn't seem to read it or parse it, until I used find
Serial.find('fname'); will return true
DigiKeyboard.println(Serial.readString()); will then print the rest of the message "=Bob&lname=Smith"
Does anyone have any suggestions on how to read and then print the entire html request message?