Re: More info in the result of a POST?

On 5/3/15 9:28 AM, Robert Sanderson wrote:
> Hi Henry,
>
> My understanding in general (not from the LDP spec) is that you should 
> return all the headers that you would on a successful GET on a 
> successful POST, and with a 201 status.
>
> I don't think there's a way to specify all of the possible media types 
> in which you can get a representation of the resource.  That would be 
> a huge list with JSON-LD profiles and frames.
>
> HTH
>
> Rob

Rob,

Why not? What's wrong with:

Accept-Post: text/turtle,text/n3,text/nt ?

This comes from:

curl -IkH "Origin: http://example.com" -H "Accept: text/turtle" 
"http://kingsley.idehen.net/DAV/home/kidehen/RWWTests/"
HTTP/1.1 200 OK
Server: Virtuoso/07.50.3213 (Linux) x86_64-redhat-linux-gnu-ANALYTICS  VDB
Connection: Keep-Alive
Date: Sun, 03 May 2015 18:03:27 GMT
Access-Control-Allow-Origin: http://example.com
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: 
Content-Type,MS-Author-Via,Allow,Accept-Patch,Accept-Post,Vary,Link,ETag,X-SPARQL-default-graph
Access-Control-Allow-Headers: Accept, Authorization, Slug, Link, Origin, 
Content-type
Accept-Ranges: bytes
Content-Type: text/turtle
MS-Author-Via: DAV, SPARQL
Allow: 
GET,HEAD,POST,PUT,DELETE,OPTIONS,PROPFIND,PROPPATCH,COPY,MOVE,LOCK,UNLOCK,TRACE,PATCH
Accept-Patch: application/sparql-update
*Accept-Post: text/turtle,text/n3,text/nt*
Vary: Accept,Origin,If-Modified-Since,If-None-Match
Link: <http://www.w3.org/ns/ldp#Resource>; rel="type"
Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"
Link: <?p=1>; rel="first"
Link: <?p=1>; rel="last"
Link: <http://kingsley.idehen.net/DAV/home/kidehen/RWWTests,meta>; 
rel="meta"
Link: <http://kingsley.idehen.net/DAV/home/kidehen/RWWTests,acl>; rel="acl"
ETag: "dcf9bac84af14a8ae25353d0cc468b5e"
X-SPARQL-default-graph: 
http://kingsley.idehen.net/DAV/home/kidehen/RWWTests/
Content-Length: 1578


Kingsley
>
> On Sun, May 3, 2015 at 3:30 AM, henry.story@bblfish.net 
> <mailto:henry.story@bblfish.net> <henry.story@bblfish.net 
> <mailto:henry.story@bblfish.net>> wrote:
>
>
>     > On 3 May 2015, at 12:04, henry.story@bblfish.net
>     <mailto:henry.story@bblfish.net> wrote:
>     >
>     > Hi,
>     >
>     >  the result of a POST is currently according to the spec § 5.2.3.1
>     >
>     >>      LDP clients should create member resources by submitting a
>     representation as the entity body of the HTTP POST to a known
>     LDPC. If the resource was created successfully, LDP servers must
>     respond with status code 201 (Created) and the Location header set
>     to the new resource’s URL. Clients shall not expect any
>     representation in the response entity body on a 201 (Created)
>     response.
>     >
>     > I was wondering if it would make sense for the client to also
>     send back
>     > all the headers as well, such as
>     >
>     > Access-Control-Allow-Origin: *
>     > Allow: OPTIONS, GET, HEAD, POST, SEARCH, PATCH, PIT
>     > Accept-Patch: application/sparql-update
>     > ETag: "1417390950000|Success(922)"
>     > Last-Modified: Sun, 1 April 2015 23:42:30 GMT
>     > This would allow the client to immediately know what further
>     operations it could do on the newly created resource.
>
>     It would be good if one could also in the result specify which
>     mime types were allowed on a GET on the created resource.
>
>     Henryt
>
>     >
>     >
>     >
>     > Henry
>     >
>     > Social Web Architect
>     > http://bblfish.net/
>     >
>
>     Social Web Architect
>     http://bblfish.net/
>
>
>
>
>
> -- 
> Rob Sanderson
> Information Standards Advocate
> Digital Library Systems and Services
> Stanford, CA 94305


-- 
Regards,

Kingsley Idehen 
Founder & CEO
OpenLink Software
Company Web: http://www.openlinksw.com
Personal Weblog 1: http://kidehen.blogspot.com
Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen
Twitter Profile: https://twitter.com/kidehen
Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
LinkedIn Profile: http://www.linkedin.com/in/kidehen
Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this

Received on Sunday, 3 May 2015 18:07:51 UTC