Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
unspecified
-
None
-
None
-
Operating System: All
Platform: All
-
4088
Description
6.4.3 Content-Type
Any HTTP request or response containing message-body shall include the Content-type header set to one of ”application/xml”, “application/json”, ”application/vnd.onem2m-res+xml”, “application/vnd.onem2m-res+json”, “application/vnd.onem2m-ntfy+xml” , “application/vnd.onem2m-ntfy+json”, “application/vnd.onem2m-attrs+xml” , “application/vnd.onem2m-attrs+json”.
Content-Type of the HTTP response should be chosen by the Hosting CSE considering Accept header given in the HTTP request. For example, if the Accept header in a request is set to “application/vnd.onem2m-prsp+xml”, then the response should use one of the oneM2M defined media types in XML serialization (see clause 6.7 [3]).
The value of the Resource Type primitive parameter, which is present in Create request primitives only, shall be appended to the Content-type of the corresponding HTTP request message in the form ty=value, separated by a semicolon character. A valid Content-Type header in this case looks e.g. as follows:
Content-Type: application/vnd.onem2m-res+xml; ty=3