GET /c1/ HTTP/1.1 Host: example.org Accept: text/turtle
HTTP/1.1 200 OK Content-Type: text/turtle ETag: "8caab0784220148bfe98b738d5bb6d13" Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type" @prefix dcterms: <http://purl.org/dc/terms/>. @prefix ldp: <http://www.w3.org/ns/ldp#>. <http://example.org/c1/> a ldp:BasicContainer; dcterms:title "A very simple container"; ldp:contains <r1>, <r2>, <r3>.
POST alice/ HTTP/1.1 Host: example.org Content-Type: text/turtle Link: <http://www.w3.org/ns/ldp/BasicContainer>; rel="type" Slug: photos @prefix ldp: <http://www.w3.org/ns/ldp#> . @prefix dcterms: <http://purl.org/dc/terms/> . <> a ldp:Container, ldp:BasicContainer; dcterms:title "Photos of Alice" ; dcterms:description "This container will contain photos of Alice." .
HTTP/1.1 201 Created Location: http://example.org/alice/photos/ ETag: "fffab0784220148bfe98b738d5bb6a00" Content-Length: 0
POST /alice/ HTTP/1.1
Host: example.org
Content-Type: text/turtle
Link: <http://www.w3.org/ns/ldp#Resource>; rel="type"
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<> a foaf:PersonalProfileDocument;
foaf:primaryTopic <#me> .
<#me> a foaf:Person;
foaf:name 'Alice Smith' .
HTTP/1.1 201 Created Location: http://example.org/alice/b0da1 ETag: "8caab0784220148bfe98b738d5bb6d13" Link: <http://www.w3.org/ns/ldp#Resource>; rel="type"
DELETE /alice/foaf HTTP/1.1 Host: example.org If-Match: "8caab0784220148bfe98b738d5bb6d13"
HTTP/1.1 204 No Content
OPTIONS /alice/ HTTP/1.1 Host: example.org
HTTP/1.1 200 OK Allow: GET, PUT, POST, OPTIONS, HEAD, DELETE, PATCH Accept-Post: text/turtle;charset=utf-8,text/n3;charset=utf-8,text/nt;charset=utf-8,text/css;charset=utf-8,text/html;charset=utf-8,text/javascript;charset=utf-8,text/plain;charset=utf-8,application/rdf+xml;charset=utf-8,application/json;charset=utf-8,multipart/form-data,image/jpeg,image/jpeg,image/png,image/gif,font/otf Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"
Optional headers:
Link: <http://example.org/alice/,acl>; rel="acl" User: https://alice.example.org/profile/card#me Access-Control-Allow-Methods: GET, PUT, POST, OPTIONS, HEAD, DELETE, PATCH Access-Control-Allow-Origin: *
LDP 1.0
Planned extensions (LDP 1.1)
HEAD /alice/ HTTP/1.1 Host: example.org
HTTP/1.1 200 OK . . . Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type", <http://example.org/alice/,acl>; rel="acl"
GET /alice/,acl HTTP/1.1 Host: example.org Accept: text/turtle
@prefix acl: <http://www.w3.org/ns/auth/acl#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<#readall> a acl:Authorization ;
acl:accessTo <.> ;
acl:mode acl:Read ;
acl:agentClass foaf:Agent .
<#acl> a acl:Authorization ;
acl:accessTo <> ;
acl:mode acl:Read, acl:Write ;
acl:agent <foaf#me>; .
Widget:
WebIDAuth : { details: {
auth: string, // type of auth method (e.g. WebID-TLS)
success: bool, // true if auth was successful
user: string // the WebID of the user
} }
App:
window.addEventListener('WebIDAuth',function(e) {
if (e.details.success === true) {
webid = e.datails.user; // set some App-specific user variable
} else {
console.log("Auth failed!");
}
},false);
* if it passes (your) privacy/security audits
News/announcements list: