A client for the SmartREST protocol from Cumulocity.
Dependencies: HTTPClient SmartRest
Diff: MbedClient.cpp
- Revision:
- 9:3bbb83e7cbfd
- Parent:
- 7:26524a6a04a1
- Child:
- 10:478414cc15a4
--- a/MbedClient.cpp Sun Feb 02 14:55:57 2014 +0000 +++ b/MbedClient.cpp Sun Feb 02 16:40:14 2014 +0000 @@ -1,6 +1,8 @@ #include "MbedClient.h" #include <stdlib.h> +#include <stdio.h> + #define STATE_INIT 0 #define STATE_IN_REQUEST 1 #define STATE_SENT_ID 2 @@ -68,7 +70,9 @@ if (_state != STATE_REQ_COMPLETE) return CLIENT_INTERNAL_ERROR; + puts("Sending data..."); result = _client.post(_url, *_generator, &_buffer); + printf("Result: %d\r\n", result); if (result != 0) return CLIENT_CONNECTION_ERROR; _state = STATE_RECVD_RESPONSE;