3.1.4.4.1 Common Rules for Sending Update Requests

This section defines all the rules to which clients MUST adhere when sending Update requests. Therefore, no additional rules for specific Update request types are defined in this document.

Update requests MUST adhere to the syntax rules specified in Update Request Types (section 2.2.7.3).

The client SHOULD specify the Content-Type (section 2.2.5.2) header in the request. If the higher layer issues an UpdateEntity request, the media type specified by the client in the Content-Type header MUST be application/atom+xml (section 2.2.5.1.1), application/json (section 2.2.5.1.2), or application/json;odata=verbose (section 2.2.5.1.3). If the request type is UpdateComplexType or UpdatePrimitiveProperty, the media type specified MUST be application/xml or application/json;odata=verbose (section 2.2.5.1.3). Finally, if the request is an UpdateValue or UpdateMediaResource request, a required media type is data dependent and not defined by this document.

If the Update request URI (provided by the higher layer) identifies an entity, ComplexType instance, primitive property, or property value, and the associated EntityType defines a concurrency token, the client SHOULD include an If-Match (section 2.2.5.5) header in the request. The concurrency token provided as the value of the header MUST be a token that is associated with the EntityType of the entity identified by the request URI. UpdateLink requests MUST NOT include an If-Match (section 2.2.5.5) header.

If the update request URI identifies a Media Resource, the request MAY include an If-Match (section 2.2.5.5) header. If an If-Match header is included, the value of the header MUST be the concurrency token associated with the Media Resource.

Use of the If-None-Match request header with Update request types is undefined by this document.

If the data service identified by the request URI supports tunneled requests, any of the Update Request Types (section 2.2.7.3) MAY be sent as a tunneled request (section 2.2.7.7).

Rules for processing responses to Update requests are specified in Update Request Types (section 2.2.7.3).

The client MAY specify a preference/hint about whether to include an entity that represents the current state of the resource in the response to a successful update request by using the Prefer (section 2.2.5.9) header.