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.
Dependents: iothub_client_sample_http simplesample_http temp_sensor_anomaly
Revision 12:9e2531d86009, committed 2016-02-04
- Comitter:
- Azure.IoT Build
- Date:
- Thu Feb 04 11:28:24 2016 -0800
- Parent:
- 11:495deb847d9c
- Child:
- 13:848d52f93daf
- Commit message:
- 1.0.0
Changed in this revision
| iothubtransporthttp.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/iothubtransporthttp.c Thu Jan 28 12:38:29 2016 -0800
+++ b/iothubtransporthttp.c Thu Feb 04 11:28:24 2016 -0800
@@ -79,14 +79,14 @@
}HTTPTRANSPORT_HANDLE_DATA;
-/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_003: [Otherwise IoTHubTransportHttp_Create shall create an immutable string (further called "event HTTP relative path") from the following pieces: "/devices/" + URL_ENCODED(config->upperConfig->deviceId) + "/messages/events?api-version=2015-08-15-preview".]*/
+/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_003: [Otherwise IoTHubTransportHttp_Create shall create an immutable string (further called "event HTTP relative path") from the following pieces: "/devices/" + URL_ENCODED(config->upperConfig->deviceId) + "/messages/events?api-version=2016-02-03".]*/
static void destroy_eventHTTPrelativePath(HTTPTRANSPORT_HANDLE_DATA* handleData)
{
STRING_delete(handleData->eventHTTPrelativePath);
handleData->eventHTTPrelativePath = NULL;
}
-/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_003: [Otherwise IoTHubTransportHttp_Create shall create an immutable string (further called "event HTTP relative path") from the following pieces: "/devices/" + URL_ENCODED(config->upperConfig->deviceId) + "/messages/events?api-version=2015-08-15-preview".]*/
+/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_003: [Otherwise IoTHubTransportHttp_Create shall create an immutable string (further called "event HTTP relative path") from the following pieces: "/devices/" + URL_ENCODED(config->upperConfig->deviceId) + "/messages/events?api-version=2016-02-03".]*/
static bool create_eventHTTPrelativePath(HTTPTRANSPORT_HANDLE_DATA* handleData, const IOTHUBTRANSPORT_CONFIG* config)
{
bool result;
@@ -113,14 +113,14 @@
return result;
}
-/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_034: [Otherwise, IoTHubTransportHttp_Create shall create an immutable string (further called "message HTTP relative path") from the following pieces: "/devices/" + URL_ENCODED(config->upperConfig->deviceId) + "/messages/devicebound?api-version=2015-08-15-preview".]*/
+/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_034: [Otherwise, IoTHubTransportHttp_Create shall create an immutable string (further called "message HTTP relative path") from the following pieces: "/devices/" + URL_ENCODED(config->upperConfig->deviceId) + "/messages/devicebound?api-version=2016-02-03".]*/
static void destroy_messageHTTPrelativePath(HTTPTRANSPORT_HANDLE_DATA* handleData)
{
STRING_delete(handleData->messageHTTPrelativePath);
handleData->messageHTTPrelativePath = NULL;
}
-/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_034: [Otherwise, IoTHubTransportHttp_Create shall create an immutable string (further called "message HTTP relative path") from the following pieces: "/devices/" + URL_ENCODED(config->upperConfig->deviceId) + "/messages/devicebound?api-version=2015-08-15-preview".]*/
+/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_034: [Otherwise, IoTHubTransportHttp_Create shall create an immutable string (further called "message HTTP relative path") from the following pieces: "/devices/" + URL_ENCODED(config->upperConfig->deviceId) + "/messages/devicebound?api-version=2016-02-03".]*/
static bool create_messageHTTPrelativePath(HTTPTRANSPORT_HANDLE_DATA* handleData, const IOTHUBTRANSPORT_CONFIG* config)
{
bool result;
@@ -169,7 +169,7 @@
"Content-Type":"application/vnd.microsoft.iothub.json"
"Accept":"application/json"
"Connection":"Keep-Alive"
-"User-Agent":"iothubclient1.0.0-preview.7]*/
+"User-Agent":"iothubclient1.0.0]*/
static bool create_eventHTTPrequestHeaders(HTTPTRANSPORT_HANDLE_DATA* handleData, const IOTHUBTRANSPORT_CONFIG* config)
{
bool result;
@@ -470,7 +470,7 @@
}
else
{
- /*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_003: [Otherwise IoTHubTransportHttp_Create shall create an immutable string (further called "event HTTP relative path") from the following pieces: "/devices/" + URL_ENCODED(config->upperConfig->deviceId) + "/messages/events?api-version=2015-08-15-preview".]*/
+ /*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_003: [Otherwise IoTHubTransportHttp_Create shall create an immutable string (further called "event HTTP relative path") from the following pieces: "/devices/" + URL_ENCODED(config->upperConfig->deviceId) + "/messages/events?api-version=2016-02-03".]*/
result = (HTTPTRANSPORT_HANDLE_DATA*)malloc(sizeof(HTTPTRANSPORT_HANDLE_DATA));
if (result == NULL)
{
@@ -1250,7 +1250,7 @@
{
/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_050: [_DoWork shall call HTTPAPIEX_SAS_ExecuteRequest with the following parameters:
-requestType: POST
--relativePath: abandon relative path begin (as created by _Create) + value of ETag + "/abandon?api-version=2015-08-15-preview"
+-relativePath: abandon relative path begin (as created by _Create) + value of ETag + "/abandon?api-version=2016-02-03"
- requestHttpHeadersHandle: an HTTP headers instance containing the following
Authorization: " "
If-Match: value of ETag
@@ -1260,7 +1260,7 @@
- responseContent: NULL]*/
/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_051: [_DoWork shall call HTTPAPIEX_SAS_ExecuteRequest with the following parameters:
-requestType: DELETE
--relativePath: abandon relative path begin + value of ETag + "?api-version=2015-08-15-preview"
+-relativePath: abandon relative path begin + value of ETag + "?api-version=2016-02-03"
- requestHttpHeadersHandle: an HTTP headers instance containing the following
Authorization: " "
If-Match: value of ETag
@@ -1270,7 +1270,7 @@
- responseContent: NULL]*/
/*Codes_SRS_IOTHUBTRANSPORTTHTTP_02_077: [_DoWork shall call HTTPAPIEX_SAS_ExecuteRequest with the following parameters:
-requestType: DELETE
--relativePath: abandon relative path begin + value of ETag +"?api-version=2015-08-15-preview" + "&reject"
+-relativePath: abandon relative path begin + value of ETag +"?api-version=2016-02-03" + "&reject"
- requestHttpHeadersHandle: an HTTP headers instance containing the following
Authorization: " "
If-Match: value of ETag
@@ -1338,7 +1338,7 @@
handleData->sasObject,
handleData->httpApiExHandle,
(action == ABANDON) ? HTTPAPI_REQUEST_POST : HTTPAPI_REQUEST_DELETE, /*-requestType: POST */
- STRING_c_str(fullAbandonRelativePath), /*-relativePath: abandon relative path begin (as created by _Create) + value of ETag + "/abandon?api-version=2015-08-15-preview" */
+ STRING_c_str(fullAbandonRelativePath), /*-relativePath: abandon relative path begin (as created by _Create) + value of ETag + "/abandon?api-version=2016-02-03" */
abandonRequestHttpHeaders, /*- requestHttpHeadersHandle: an HTTP headers instance containing the following */
NULL, /*- requestContent: NULL */
&statusCode, /*- statusCode: a pointer to unsigned int which might be examined for logging */
