changed the content type of telemetry to be application/json and utf-8

This commit is contained in:
ianholl 2020-08-06 11:07:21 -07:00
Родитель 646d8f4ddd
Коммит eb8d0f862a
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -71,6 +71,11 @@ static EVENT_INSTANCE *createEventInstance(IOTContextInternal *internal,
*errorCode = 9;
return NULL;
}
// set the message content type to application/json and utf-8
(void)IoTHubMessage_SetContentTypeSystemProperty(currentMessage->messageHandle, "application%2fjson");
(void)IoTHubMessage_SetContentEncodingSystemProperty(currentMessage->messageHandle, "utf-8");
currentMessage->internal = internal;
currentMessage->appContext = applicationContext;

Просмотреть файл

@ -71,6 +71,11 @@ static EVENT_INSTANCE *createEventInstance(IOTContextInternal *internal,
*errorCode = 9;
return NULL;
}
// set the message content type to application/json and utf-8
(void)IoTHubMessage_SetContentTypeSystemProperty(currentMessage->messageHandle, "application%2fjson");
(void)IoTHubMessage_SetContentEncodingSystemProperty(currentMessage->messageHandle, "utf-8");
currentMessage->internal = internal;
currentMessage->appContext = applicationContext;