Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of M2XStreamClient by
Diff: M2XStreamClient_template.h
- Revision:
- 14:205076b587fe
- Parent:
- 13:0d574742208f
- Child:
- 15:2610823f7f2e
--- a/M2XStreamClient_template.h Tue Dec 09 14:36:16 2014 +0000
+++ b/M2XStreamClient_template.h Sun Jan 04 05:26:33 2015 +0000
@@ -57,7 +57,10 @@
DBGLN("%s", "Connected to M2X server!");
int length = write_multiple_values(&_null_print, streamNum, names,
counts, ats, values);
- _client->print("POST /v2/devices/");
+ _client->print("POST ");
+ if (_path_prefix)
+ _client->print(_path_prefix);
+ _client->print("/v2/devices/");
print_encoded_string(_client, deviceId);
_client->println("/updates HTTP/1.0");
writeHttpHeader(length);
@@ -113,7 +116,10 @@
int length = write_location_data(&_null_print, name, latitude, longitude,
elevation);
- _client->print("PUT /v2/devices/");
+ _client->print("PUT ");
+ if (_path_prefix)
+ _client->print(_path_prefix);
+ _client->print("/v2/devices/");
print_encoded_string(_client, deviceId);
_client->println("/location HTTP/1.0");
