Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iot-dev): Fix default Content Type and Content Encoding #1798

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nabinbhandari
Copy link

@nabinbhandari nabinbhandari commented Oct 27, 2024

Set default Content Type of D2C Message to null and default Content Encoding to UTF-8.

Github issue (fix#118)

Checklist

Reference/Link to the issue solved with this PR (if any)

#118

Description of the problem

The existing code set the default content type (instead of content encoding) to "UTF-8". This would prevent using message routing by querying on the message body even if the content type was explicitly set to "application/json".

Description of the solution

Used default IoT Hub message charset name to set the content encoding of the message instead of content type. An application using the client SDK should still explicitly set the content type to "application/json" to enable proper message routing.

Set default Content Type of D2C Message to null and default Content Encoding to UTF-8.

Github issue (fix#118)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant