oneM2M TS-0009Release Notes diff from v5.1.0 to v5.1.0HTTP binding specifies the equivalence between oneM2M request and response primitives and HTTP request and response messages, respectively. This clause provides a brief overview on the mapping relationship between oneM2M and HTTP message parameters.
This clause describes how oneM2M request/response primitives can be mapped to HTTP request/response messages and vice versa.
Figure 5.1‑1 illustrates an example oneM2M system configuration and its correspondence to an HTTP-based information system if HTTP binding as defined in this specification is applied. The upper diagram in figure 5.1‑1 shows with solid line arrows the flow of a request primitive originating from an AE which is registered to an MN-CSE (Registrar of AE). The request primitive is assumed to address a resource which is hosted by another MN-CSE (Host of Resource). Both MN-CSEs are registered to the same IN-CSE.
When applying HTTP binding, the oneM2M entities of the upper diagram take the roles outlined in the lower diagram of a corresponding HTTP information system as defined in IETF RFC 7230 [1]. The AE takes the role of an HTTP client, the MN-CSE (Registrar of AE) takes the role of a HTTP Proxy Server, and both the IN-CSE and MN-CSE (Host of Resource) take the role of a HTTP server for this particular request message.
CSEs may also issue unsolicited request messages, shown with dashed line arrows in figure 5.1‑1, and receive associated response messages. Therefore, for HTTP protocol binding, CSEs generally provides capability of both HTTP Server and HTTP Client. AEs may provide HTTP Server capability optionally in order to be able to serve Notification request messages (see TS-0004 [3] and TS-0001 [7]).


Figure 5.1‑1 : Correspondence between oneM2M entities and HTTP Client and Server
Each individual request primitive will be mapped to single HTTP request message, and each individual response primitive will be mapped to a single HTTP response message, and vice-versa.
An HTTP request message consists of Request-Line, headers and message-body. An HTTP response message consists of Status-Line, headers and message-body [1]. HTTP header names are case-insensitive and a Receiver shall accept headers that are either lower or upper or any mixture thereof. This clause describes how oneM2M request/response primitives are mapped to HTTP messages at a high level. Corresponding details are specified in clause 6.
The HTTP method of a request message is mapped to the Operation parameter, and vice-versa.
At the message originator side the HTTP Request-Target is derived from the To parameter of the request primitive, including a query string which carries other specific primitive parameters.
HTTP-Version is specified in clause 6.
HTTP Version is specified in clause 6.
The Status-Code of HTTP response messages is derived from the Response Status Code parameter of the response primitive. The Reason-Phrase is not applicable to oneM2M systems and is omitted.