added 'Accept-Post' and 'Accept-Patch' headers to container retrieval responses
authorNandana Mihindukulasooriya <nandana.cse@gmail.com>
Mon, 15 Sep 2014 14:39:01 +0200
changeset 831 f486e0154209
parent 830 1006614214e6
child 832 e6d7164503af
added 'Accept-Post' and 'Accept-Patch' headers to container retrieval responses
ldp-primer/examples/bcget_res.txt
ldp-primer/examples/getbc_res.txt
ldp-primer/examples/ic_product_lookup_resp.txt
ldp-primer/examples/product_lookup_resp.txt
ldp-primer/ldp-primer.html
--- a/ldp-primer/examples/bcget_res.txt	Mon Sep 15 12:28:29 2014 +0200
+++ b/ldp-primer/examples/bcget_res.txt	Mon Sep 15 14:39:01 2014 +0200
@@ -2,6 +2,8 @@
 Content-Type: text/turtle; charset=UTF-8
 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type', <http://www.w3.org/ns/ldp#Resource>; rel='type'
 Allow: OPTIONS,HEAD,GET,POST,PUT,PATCH
+Accept-Post: text/turtle, application/ld+json, image/bmp, image/jpeg
+Accept-Patch: text/ldpatch
 Content- Length: 245
 ETag: W/'123456789'
   
@@ -18,6 +20,8 @@
 Content-Type: application/ld+json; charset=UTF-8
 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type', <http://www.w3.org/ns/ldp#Resource>; rel='type'
 Allow: OPTIONS,HEAD,GET,POST,PUT,PATCH
+Accept-Post: text/turtle, application/ld+json, image/bmp, image/jpeg
+Accept-Patch: text/ldpatch
 Content- Length: 255
 ETag: W/'123456789'
   
--- a/ldp-primer/examples/getbc_res.txt	Mon Sep 15 12:28:29 2014 +0200
+++ b/ldp-primer/examples/getbc_res.txt	Mon Sep 15 14:39:01 2014 +0200
@@ -2,6 +2,8 @@
 Content-Type: text/turtle; charset=UTF-8
 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type', <http://www.w3.org/ns/ldp#Resource>; rel='type'
 Allow: OPTIONS,HEAD,GET,POST,PUT,PATCH
+Accept-Post: text/turtle, application/ld+json, image/bmp, image/jpeg
+Accept-Patch: text/ldpatch
 Content-Length: 250
 ETag: W/'123456789'
 	
@@ -17,6 +19,8 @@
 Content-Type: application/ld+json; charset=UTF-8
 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type', <http://www.w3.org/ns/ldp#Resource>; rel='type'
 Allow: OPTIONS,HEAD,GET,POST,PUT,PATCH
+Accept-Post: text/turtle, application/ld+json, image/bmp, image/jpeg
+Accept-Patch: text/ldpatch
 Content-Length: 270
 ETag: W/'123456789'
 	
--- a/ldp-primer/examples/ic_product_lookup_resp.txt	Mon Sep 15 12:28:29 2014 +0200
+++ b/ldp-primer/examples/ic_product_lookup_resp.txt	Mon Sep 15 14:39:01 2014 +0200
@@ -2,6 +2,8 @@
 Content-Type: text/turtle; charset=UTF-8
 Link: <http://www.w3.org/ns/ldp#IndirectContainer>; rel="type",  <http://www.w3.org/ns/ldp#Resource>; rel='type'
 Allow: OPTIONS,HEAD,GET,POST,PUT,PATCH
+Accept-Post: text/turtle, application/ld+json
+Accept-Patch: text/ldpatch
 Content-Length: 256
 ETag: W/"123456789"
 
@@ -26,6 +28,8 @@
 Content-Type: application/ld+json; charset=UTF-8
 Link: <http://www.w3.org/ns/ldp#IndirectContainer>; rel="type",  <http://www.w3.org/ns/ldp#Resource>; rel='type'
 Allow: OPTIONS,HEAD,GET,POST,PUT,PATCH
+Accept-Post: text/turtle, application/ld+json
+Accept-Patch: text/ldpatch
 Content-Length: 278
 ETag: W/"123456789"
 
--- a/ldp-primer/examples/product_lookup_resp.txt	Mon Sep 15 12:28:29 2014 +0200
+++ b/ldp-primer/examples/product_lookup_resp.txt	Mon Sep 15 14:39:01 2014 +0200
@@ -2,6 +2,8 @@
 Content-Type: text/turtle; charset=UTF-8
 Link: <http://www.w3.org/ns/ldp#DirectContainer>; rel="type",  <http://www.w3.org/ns/ldp#Resource>; rel='type'
 Allow: OPTIONS,HEAD,GET,POST,PUT,PATCH
+Accept-Post: text/turtle, application/ld+json
+Accept-Patch: text/ldpatch
 Content-Length: 246  
 ETag: W/"123456789"
 
@@ -24,6 +26,8 @@
 Content-Type: application/ld+json; charset=UTF-8
 Link: <http://www.w3.org/ns/ldp#DirectContainer>; rel="type",  <http://www.w3.org/ns/ldp#Resource>; rel='type'
 Allow: OPTIONS,HEAD,GET,POST,PUT,PATCH
+Accept-Post: text/turtle, application/ld+json
+Accept-Patch: text/ldpatch
 Content-Length: 315
 ETag: W/"123456789"
 
--- a/ldp-primer/ldp-primer.html	Mon Sep 15 12:28:29 2014 +0200
+++ b/ldp-primer/ldp-primer.html	Mon Sep 15 14:39:01 2014 +0200
@@ -448,7 +448,7 @@
       
       <p> As shown in the example, in addition to the RDF representation of the Basic Container using the requested media type the server provides an etag of the resource representation and Link headers advertising that the requested resource is indeed an LDP Basic Container and it will support the LDP interaction model. </p>
       
-		<p> In addition, the response also contains "Allow" header which advertises which HTTP operations are supported by this LDP Basic Container resource. In this example, it supports OPTIONS,HEAD,GET,POST,PUT,PATCH HTTP verbs.</p>      
+		<p> In addition, the response also contains "Allow", "Accept-Post" , "Accept-Patch" headers. The "Allow" header advertises which HTTP operations are supported by this LDP Basic Container resource. In this example, it supports OPTIONS,HEAD,GET,POST,PUT,PATCH HTTP verbs. The "Accept-Post" and "Accept-Patch" headers advertise which are the media types supported by the POST and the PATCH method respectively.</p>      
       
       <p class="note">The Linked Data Platform 1.0 specification [[LDP]] says that all LDP servers MUST support the Turtle media type for LDP-RS resources and SHOULD support JSON-LD media type.</p>
 
@@ -470,7 +470,7 @@
 HTTP/1.1 204 OK
 Allow: OPTIONS,HEAD,GET,POST,PUT,PATCH
 Accept-Post: text/turtle, application/ld+json, image/bmp, image/jpeg
-Accept-Patch: example/patch
+Accept-Patch: text/ldpatch
 Link: &lt;http://www.w3.org/ns/ldp#BasicContainer&gt;; rel=&#39;type&#39;, &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel=&#39;type&#39;     
       </pre> 
 
@@ -848,6 +848,7 @@
       <pre title="A response of creating new a bug" class='example' data-oninclude='fixCode'>
 HTTP/1.1 201 Created
 Location: http://example.org/tracker/ldp-demo/bug67
+Link: &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel=&quot;type&quot;
 Content-Length: 0           
       </pre>