-
Notifications
You must be signed in to change notification settings - Fork 25
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
Which content-type to use for SSE? #347
Comments
If we decide that we use For E.g.: for |
Note that the HTTP SSE Profile mandates the No The HTTP SSE Profile also mandates JSON as a format for serialising data payloads in events. I think Thing Descriptions currently lack the semantics to describe a sub-content-type, but I do think using I am starting to think that there should be a separate SSE Protocol Binding Template document which describes how to use SSE with the Web of Things. Note that there are examples of content types that contain other content types on the Internet in general (e.g. |
There is sort of a way to do this with contentMediaType, example https://w3c.github.io/wot-thing-description/#example-38 In that case, form content type would be
I agree with this one. It can be part of the HTTP Binding Template but as a separate and clear section. |
Interesting. That does have the potential for confusion though. In the HTTP SSE Profile, the The So if I have a property or event with a numerical value, do I use "number" in the data schema to refer to the data payload or "string" so that I can use the Either way no Consumer is going to know to do this without being explicitly programmed to do so, so it needs specifying somewhere, e.g. in a protocol binding document. I don't mind whether the SSE binding is described inside the HTTP binding document or in a separate one, but it is a bit of a tricky one because it's both a protocol binding (e.g. the |
In this example form we are using Server-Sent Events
As we all know that is the content-type of the SSE specification, but the SSE payload may contain other textual formats like JSON or even XML. The content-type specified above it is more the content-type of the message structure used to convey the important application data. As with other protocols, the current practice in WoT is to use the content-type more as in indication of what is there for the application, rather than the actual content of what is sent on the wire. We should revisit this issue once we settle the discussion on data mapping.
===
Coming from #342 (comment)_
The text was updated successfully, but these errors were encountered: