nmattisson / HttpClient

Http Client Library for the Spark Core (also well suited for Arduino and other embedded platforms).
Other
121 stars 150 forks source link

'millis' was not declared in this scope #19

Closed zoltangbereczky closed 8 years ago

zoltangbereczky commented 9 years ago

Veryfing code using this library in Particle Build fails with this error:

HttpClient/HttpClient.cpp:172:37: error: 'millis' was not declared in this scope
     unsigned long lastRead = millis()
HttpClient/HttpClient.cpp:231:22: error: 'delay' was not declared in this scope
             delay(200);
HttpClient/HttpClient.cpp:266:47: error: 'atoi' was not declared in this scope
             aResponse.status = atoi(statusCode.c_str());
ilessiivi commented 9 years ago

I ran into this problem myself and as suggested here, HttpClient.h needs to have #include "application.h" in order to work on Photons. I created the pull request #20 for this.