A client for the SmartREST protocol from Cumulocity.
Fork of MbedSmartRest by
Revision 9:3bbb83e7cbfd, committed 2014-02-02
- Comitter:
- vwochnik
- Date:
- Sun Feb 02 16:40:14 2014 +0000
- Parent:
- 8:762dc52db813
- Child:
- 10:478414cc15a4
- Commit message:
- fix
Changed in this revision
--- a/HTTPClient.lib Sun Feb 02 14:55:57 2014 +0000 +++ b/HTTPClient.lib Sun Feb 02 16:40:14 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/vwochnik/code/HTTPClient/#66f1c10a5e9a +http://mbed.org/users/vwochnik/code/HTTPClient/#967c00d70d95
--- a/HTTPGeneratorWrapper.cpp Sun Feb 02 14:55:57 2014 +0000 +++ b/HTTPGeneratorWrapper.cpp Sun Feb 02 16:40:14 2014 +0000 @@ -1,5 +1,6 @@ #include "HTTPGeneratorWrapper.h" #include <stdlib.h> +#include <stdio.h> #include <string.h> HTTPGeneratorWrapper::HTTPGeneratorWrapper(DataGenerator& generator) : _sink(generator.writtenLength())
--- 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;