I am looking for some help from someone with experience in this sort of arrangements in order to save some development/testing time.
Currently I am doing as follows:
Code: Select all
while(file){
dataBuffer = SD.open(file.name(), FILE_READ);
while (dataBuffer.available()) {
//open channel
HTTPClient http;
http.begin(URLtxt);
//send request + data
http.addHeader("Content-Type", "application/x-www-form-urlencoded");
SQLtxt = dataBuffer.readStringUntil('\n');
_post = "query=" + urlencode(SQLtxt);
httpResponseCode = http.POST(_post);
..... check if response is ok or not
http.end()
}
}
Something like:
Code: Select all
while(file){
dataBuffer = SD.open(file.name(), FILE_READ);
//open channel
HTTPClient http;
http.begin(URLtxt);
//send request + data
http.addHeader("Content-Type", "application/x-www-form-urlencoded");
while (dataBuffer.available()) {
SQLtxt = dataBuffer.readStringUntil('\n');
_post = "query=" + urlencode(SQLtxt);
httpResponseCode = http.POST(_post);
..... check if response is ok or not
}
http.end()
}
Thanks in advance.
Paulo