Added function deleteLocations to delete the location history.
Dependents: WNCInterface_M2Xdemo ATT_WNCInterface_Info WNCInterface_HTTP_example Public_IoT_M2X_Cellular_Demo
Fork of M2XStreamClient by
Revision 25:67079c11d1ea, committed 2016-09-18
- Comitter:
- JMF
- Date:
- Sun Sep 18 14:45:31 2016 +0000
- Parent:
- 24:6a5ba4cfa19a
- Commit message:
- Changed HTTP/1.0 references to HTTP/1.1 because the server apparently answeres 1.0 requests incorrectly which causes the library to hang.
Changed in this revision
M2XStreamClient.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 6a5ba4cfa19a -r 67079c11d1ea M2XStreamClient.h --- a/M2XStreamClient.h Sun Sep 11 02:20:45 2016 +0000 +++ b/M2XStreamClient.h Sun Sep 18 14:45:31 2016 +0000 @@ -513,7 +513,7 @@ if (_path_prefix) { _client->print(_path_prefix); } _client->print("/v2/devices/"); _client->print(deviceId); - _client->println("/updates HTTP/1.0"); + _client->println("/updates HTTP/1.1"); writeHttpHeader(length); write_multiple_values(_client, streamNum, names, counts, ats, values); } else { @@ -559,7 +559,7 @@ if (_path_prefix) { _client->print(_path_prefix); } _client->print("/v2/devices/"); _client->print(deviceId); - _client->println("/update HTTP/1.0"); + _client->println("/update HTTP/1.1"); writeHttpHeader(length); write_single_device_values(_client, streamNum, names, values, at); } else { @@ -617,7 +617,7 @@ if (_path_prefix) { _client->print(_path_prefix); } _client->print("/v2/devices/"); _client->print(deviceId); - _client->println("/location HTTP/1.0"); + _client->println("/location HTTP/1.1"); writeHttpHeader(length); write_location_data(_client, name, latitude, longitude, elevation); @@ -670,7 +670,7 @@ _client->print("/commands/"); _client->print(commandId); _client->print("/process"); - _client->println(" HTTP/1.0"); + _client->println(" HTTP/1.1"); writeHttpHeader(length); callback(_client, context); } else { @@ -709,7 +709,7 @@ _client->print("/commands/"); _client->print(commandId); _client->print("/reject"); - _client->println(" HTTP/1.0"); + _client->println(" HTTP/1.1"); writeHttpHeader(length); callback(_client, context); } else { @@ -749,7 +749,7 @@ DBGLN("%s", "Connected to M2X server!"); _client->print("GET "); if (_path_prefix) { _client->print(_path_prefix); } - _client->println("/v2/time/seconds HTTP/1.0"); + _client->println("/v2/time/seconds HTTP/1.1"); writeHttpHeader(-1); } else { @@ -809,7 +809,7 @@ _client->print(deviceId); _client->print("/streams/"); print_encoded_string(_client, streamName); - _client->println("/value HTTP/1.0"); + _client->println("/value HTTP/1.1"); writeHttpHeader(contentLength); } @@ -824,7 +824,7 @@ _client->print("/streams/"); print_encoded_string(_client, streamName); _client->print("/values"); - _client->println(" HTTP/1.0"); + _client->println(" HTTP/1.1"); writeHttpHeader(contentLength); } @@ -836,7 +836,7 @@ _client->print("/v2/devices/"); _client->print(deviceId); _client->print("/location/waypoints/"); - _client->println(" HTTP/1.0"); + _client->println(" HTTP/1.1"); writeHttpHeader(contentLength); } @@ -1397,7 +1397,7 @@ _client->print(query); } - _client->println(" HTTP/1.0"); + _client->println(" HTTP/1.1"); writeHttpHeader(-1); } else { DBGLN("%s", "ERROR: Cannot connect to M2X server!"); @@ -1421,7 +1421,7 @@ if (_path_prefix) { _client->print(_path_prefix); } _client->print("/v2/devices/"); _client->print(deviceId); - _client->println("/location HTTP/1.0"); + _client->println("/location HTTP/1.1"); writeHttpHeader(-1); } else { @@ -1471,7 +1471,7 @@ _client->print(query); } - _client->println(" HTTP/1.0"); + _client->println(" HTTP/1.1"); writeHttpHeader(-1); } else { DBGLN("%s", "ERROR: Cannot connect to M2X server!");