Is there a registered media type for when using the structured clone extension #65
Replies: 1 comment 1 reply
-
How to indicate which extension tags that need to be supported is a great question, and something we might want to pose to the IETF CBOR committee. I am inclined to thing this might actually be a good place to use media type parameters, and specify the tags that are need like: However, I didn't think you should need to specific |
Beta Was this translation helpful? Give feedback.
-
I have noticed that if you encode with the structured clone extension but attempt to decode without it, cbor-x throws an error. I'm building an API where every response body is encoded in cbor-x with the structured clone extension, and I wonder how best to tell clients precisely what encoding is being used. RFC 6839 says you should not use an unregistered suffix like
application/vnd.my-app+cbor-sc
, so for now; I'm just usingapplication/vnd.my-app+cbor
and giving good documentation. I'm also catching the error thrown by cbor-x and explicitly mentioning that you need to use the structured clone extension in my error response. Still, I wonder if there is a valid way to specify it in the Content-Type header.Beta Was this translation helpful? Give feedback.
All reactions