A client for the SmartREST protocol from Cumulocity.
Fork of MbedSmartRest by
Diff: MbedClient.cpp
- Revision:
- 12:788dd934f283
- Parent:
- 10:478414cc15a4
- Child:
- 13:e76920d5e1ec
diff -r 844856ab160d -r 788dd934f283 MbedClient.cpp --- a/MbedClient.cpp Mon Mar 24 09:58:17 2014 +0000 +++ b/MbedClient.cpp Wed Apr 02 12:23:46 2014 +0000 @@ -49,8 +49,10 @@ uint8_t MbedClient::sendData(DataGenerator& generator) { + puts("Send called."); if ((_state != STATE_IN_REQUEST) && (_state != STATE_SENT_ID)) return CLIENT_INTERNAL_ERROR; + puts("Setting gen."); _generator = new HTTPGeneratorWrapper(generator); _state = STATE_SENT_DATA; return CLIENT_OK; @@ -68,8 +70,10 @@ { HTTPResult result; + puts("Action"); if (_state != STATE_REQ_COMPLETE) return CLIENT_INTERNAL_ERROR; + puts("Calling"); result = _client.post(_url, *_generator, &_buffer); if (result != 0) return CLIENT_CONNECTION_ERROR;