Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Accept-Post and Accept-Put methods #9

Closed
namedgraph opened this issue Aug 6, 2018 · 7 comments
Closed

Implement Accept-Post and Accept-Put methods #9

namedgraph opened this issue Aug 6, 2018 · 7 comments
Assignees

Comments

@namedgraph
Copy link
Member

https://tools.ietf.org/html/rfc7231#section-4.3.7
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS

@namedgraph namedgraph self-assigned this Aug 6, 2018
@csarven
Copy link

csarven commented Dec 8, 2018

Make sure to expose the following headers where applicable:

Allow
Accept-Post
Accept-Patch
Accept-Put

@namedgraph
Copy link
Member Author

Accept-Post is semi-defined in the LDP spec: https://www.w3.org/TR/ldp/#header-accept-post

@namedgraph
Copy link
Member Author

@namedgraph
Copy link
Member Author

I think the implementation should be:

  • Accept-Post on Container resources (creates new child resource)
  • Accept-Put, Accept-Post, Accept-Patch (SPARQL update) on named graphs

@namedgraph
Copy link
Member Author

OPTIONS is supported by Jersey by default:

OPTIONS /demo/city-graph/ HTTP/1.1
Host: linkeddatahub.com:4443
User-Agent: curl/7.47.0
Accept: */*

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Strict-Transport-Security: max-age=31536000;includeSubDomains
Allow: OPTIONS,HEAD,DELETE,POST,GET,PUT
Last-modified: Wed, 19 Dec 2018 00:01:48 CET
Vary: Accept
Content-Type: application/vnd.sun.wadl+xml
Content-Length: 1015
Date: Thu, 20 Dec 2018 20:17:11 GMT

I'll look into the other headers now.

@namedgraph namedgraph changed the title Implement HTTP OPTIONS method Implement Accept-Post and Accept-Put methods Dec 20, 2018
@namedgraph
Copy link
Member Author

Looks like this is at implemented for the Graph Store Protocol with direct graph identification:
https://github.com/AtomGraph/LinkedDataHub/blob/master/src/main/java/com/atomgraph/linkeddatahub/resource/graph/Item.java#L106

@namedgraph
Copy link
Member Author

pumba@LAPTOP-BL3MCU0O:~$ curl -k https://kgdev.net -X OPTIONS -I
HTTP/1.1 200
Server: nginx/1.21.4
Date: Thu, 17 Feb 2022 21:23:59 GMT
Content-Length: 0
Connection: keep-alive
Allow: GET
Allow: POST
Allow: PUT
Allow: DELETE
Accept-Post: text/html;charset=UTF-8,application/xhtml+xml;charset=UTF-8,application/rdf+xml;charset=UTF-8,application/n-triples;charset=UTF-8,application/rdf+protobuf;charset=UTF-8,application/trix;charset=UTF-8,application/ld+json;charset=UTF-8,x/ld-json-11;charset=UTF-8,text/shaclc;charset=UTF-8,application/rdf+thrift;charset=UTF-8,text/turtle;charset=UTF-8,text/rdf+n3;charset=UTF-8,application/rdf+json;charset=UTF-8
Link: <https://kgdev.net/>; rel=https://www.w3.org/ns/ldt#base
Link: <https://kgdev.net/sparql>; rel=http://www.w3.org/ns/sparql-service-description#endpoint
Link: <https://kgdev.net/admin/model/ontologies/namespace/#>; rel=https://www.w3.org/ns/ldt#ontology

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants