A client for the SmartREST protocol from Cumulocity.
Fork of MbedSmartRest by
Diff: MbedClient.cpp
- Revision:
- 10:478414cc15a4
- Parent:
- 9:3bbb83e7cbfd
- Child:
- 12:788dd934f283
--- a/MbedClient.cpp Sun Feb 02 16:40:14 2014 +0000 +++ b/MbedClient.cpp Wed Feb 05 16:21:46 2014 +0000 @@ -70,11 +70,12 @@ 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; + char *p = _buffer._buf; + while (p != _buffer._wptr) + putchar(*p++); _state = STATE_RECVD_RESPONSE; return CLIENT_OK; }