4.7.2 Updating a Named Resource Stream Instance

To update the named resource stream instance, clients use a standard HTTP [RFC2616] PUT to the URI that is specified in the named resource stream instance's edit link.

The server indicates that updates to the named resource stream instance are subject to concurrency control checks by returning an ETag (section 2.2.5.4) for the named resource stream instance whenever a client retrieves the containing EntityType instance.

If an ETag is specified, the client sets the value of the If-Match header to the known ETag value.

HTTP Request:

        PUT /Photos(1)/SampleModel.Photo/Thumbnail HTTP/1.1
        Host: host
        Content-Type: application/png
        DataServiceVersion: 1.0
        MaxDataServiceVersion: 3.0
        If-Match: ...ETag...
        Content-Length: ####
  
        ...binary data for the png thumbnail ...

HTTP Response:

        HTTP/1.1 204 No Content
        Date: Fri, 11 Oct 2008 04:23:49 GMT
        DataServiceVersion: 1.0