A client for the SmartREST protocol from Cumulocity.
Dependencies: HTTPClient SmartRest
Revision 12:788dd934f283, committed 2014-04-02
- Comitter:
- vwochnik
- Date:
- Wed Apr 02 12:23:46 2014 +0000
- Parent:
- 11:844856ab160d
- Commit message:
- fix
Changed in this revision
MbedClient.cpp | Show annotated file Show diff for this revision Revisions of this file |
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;