A wrapper class for talking to Axeda from MBED devices. Uses HTTPClient and MbedJSONValue classes.
Dependents: axeda_wrapper_dev MTS_Axeda_Example
AxedaWrapper simplifies pushing data to Axeda's cloud.
Uses HTTPClient and MbedJSONValue libs:
http://mbed.org/users/donatien/code/HTTPClient/
http://mbed.org/users/samux/code/MbedJSONValue/
Diff: AxedaWrapper.cpp
- Revision:
- 5:dd1e00e3eba5
- Parent:
- 3:134410324a6a
--- a/AxedaWrapper.cpp Thu Jan 02 18:47:51 2014 +0000 +++ b/AxedaWrapper.cpp Sat Jan 04 05:07:10 2014 +0000 @@ -99,8 +99,10 @@ HTTPText to_recv(buf, sizeof(buf)); ret = _http_client->post(_url.c_str(), to_send, &to_recv, _timeout); if (ret != HTTP_OK) { - printf("[ERROR] HTTP POST returned %d\n\r", _http_client->getHTTPResponseCode()); + printf("[ERROR] HTTP POST failed\n\r"); return false; + } else { + printf("[INFO] HTTP POST returned %d\r\n", _http_client->getHTTPResponseCode()); } return true; } \ No newline at end of file