interactive-matter/HTTPClient

setup function is executed many times

Opened this issue · 2 comments

If I put the next line: client.closeStream(result);, the "setup" function is executed many times!... and when I don't close the stream (I mean, when I don't put that piece of code), setup goes fine... but a few minutes more, I cannot connect with the server.

here is my code:

FILE* result = client.postURI(uri, NULL, data, header );
//int returnCode = client.getLastReturnCode();
if (result != NULL) {
client.closeStream(result); // <--- that line is the problem.
Serial.println("sent");
}

that code is in the loop function.

Hope can help me

I've had a similar problem. Could you post how your header, data and uri are declared and assigned?

fdo36 commented

I quitted using that library, I did the conection "manually".