interactive-matter / HTTPClient

An Arduino HTTP Client
https://interactive-matter.eu/how-to/arduino-http-client-library/
101 stars 33 forks source link

setup function is executed many times #11

Open fdo36 opened 10 years ago

fdo36 commented 10 years ago

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

AndreiRO commented 9 years ago

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

fdo36 commented 8 years ago

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