Closed soccou closed 6 years ago
Hello! Sorry for the delayed reply.
The existing api to read query parameters maybe wasn't the most intuitive. It was reading the value to an internal buffer and the buffer was overwritten as soon the next value was read.
I updated the function so that the buffer for the value is given as a parameter. These changes were merged in pr https://github.com/lasselukkari/aWOT/pull/14
Here is an updated version of your code.
void correctionGetRequest(Request &req, Response &res) {
char correctionValue[64];
char chanNumberParam[64];
req.query("VAL", correctionValue, 64);
req.query("ID", chanNumberParam, 64);
int chanNumber = atoi(chanNumberParam);
res.success("text/html");
res.print("chanNumber: ");
res.print(chanNumber);
res.print("<br/>");
res.print("correctionValue:");
res.print(correctionValue);
res.print("<br/>");
}
Nice, thanks for the reply and the patch. I will give it a try.
Hi,
First thanks for sharing your excellent library. I had spent quite a while looking for something like this.
However, it appears that there may be an issue with trying to pass more than one query parameter? or perhaps I am doing something wrong. (that is always very possible... )
Example code
It seems like when you look at the values they both equal value passed for "ID" unless you don't pass that value at all, then the other parameter works, examples :
Any suggestions?