4.6.1 Insert a New Media Resource

HTTP Request:

        POST /Documents/ HTTP/1.1
        Host: host
        Content-Type: application/rtf
        Slug: Meeting Notes
        Content-Length: ####
        DataServiceVersion: 1.0
        MaxDataServiceVersion: 1.0
  
  
        ...binary data for the rtf document...

HTTP Response:

        HTTP/1.1 201 Created
        Date: Fri, 11 Oct 2008 04:23:49 GMT
        Content-Length: ###
        Content-Type:  application/atom+xml;type=entry;charset="utf-8"
        DataServiceVersion: 1.0
        Location: http://host/service.svc/Documents(300)
  
        <?xml version="1.0"?>
        <entry xmlns="http://www.w3.org/2005/Atom">
           <title type="text"/>
            <id> http://host/service.svc/Documents(300)</id>
            <updated>2008-11-03T04:23:49Z</updated>
            <author><name></name></author>
            <category term="SampleModel.Document"
               scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
            <summary type="text" />
            <content type="application/rtf"
               src="http://host/service.svc/Documents(300)/$value"/>
            <m:properties>
               <d:DocumentID>300</d:DocumentID>
               <d:Author>Joe Smith</d:Author>
               <d:Title>Meeting Notes</d:Title>
            </m:properties>
            <link rel="edit-media"
                  href="http://host/service.svc/Documents(300)/SampleModel.Document/$value" />
            <link rel="edit"
                  href="http://host/service.svc/Documents(300)/SampleModel.Document" />    
        </entry>