Skip to content

Commit 9606412

Browse files
feat: Add Examples (#21)
SHA: b93076e Reason: push, by CxRes Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent dda0702 commit 9606412

1 file changed

Lines changed: 66 additions & 6 deletions

File tree

protocol/index.html

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta content="Bikeshed version ac5ea272d, updated Fri Dec 6 15:45:15 2024 -0800" name="generator">
99
<link href="https://solid.github.io/solid-prep/protocol" rel="canonical">
1010
<link href="https://solidproject.org/favicon.ico" rel="icon">
11-
<meta content="0b131d0d07062b846c560bd5a0fff80725572e35" name="revision">
11+
<meta content="b93076e821fc14ad38a992ba8649f6d918d71876" name="revision">
1212
<meta content="dark light" name="color-scheme">
1313
<link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css">
1414
<style>
@@ -637,7 +637,7 @@
637637
<body class="h-entry">
638638
<div class="head">
639639
<h1 class="p-name no-ref" id="title">Solid-PREP</h1>
640-
<p id="w3c-state"><a href="https://www.w3.org/standards/types/#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-12-29">29 December 2024</time></p>
640+
<p id="w3c-state"><a href="https://www.w3.org/standards/types/#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-12-30">30 December 2024</time></p>
641641
<details open>
642642
<summary>More details about this document</summary>
643643
<div data-fill-with="spec-metadata">
@@ -688,7 +688,7 @@ <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
688688
<li><a href="#intended-audience"><span class="secno">1.1</span> <span class="content">Audience</span></a>
689689
</ol>
690690
<li><a href="#request"><span class="secno">2</span> <span class="content">Request</span></a>
691-
<li><a href="#format"><span class="secno">3</span> <span class="content">Format</span></a>
691+
<li><a href="#Response"><span class="secno">3</span> <span class="content">Response</span></a>
692692
<li><a href="#triggers"><span class="secno">4</span> <span class="content">Triggers</span></a>
693693
<li>
694694
<a href="#data-model"><span class="secno">5</span> <span class="content">Data Model</span></a>
@@ -778,9 +778,69 @@ <h3 class="heading settled" data-level="1.1" id="intended-audience"><span class=
778778
<p><a href="http://data.europa.eu/esco/occupation/c40a2919-48a9-40ea-b506-1f34f693496d">Application developers</a> who wish to implement a client to listen for updates to LDP Resources on Solid servers.</p>
779779
</ul>
780780
<h2 class="heading settled" data-level="2" id="request"><span class="secno">2. </span><span class="content">Request</span><a class="self-link" href="#request"></a></h2>
781-
<p>A <a data-link-type="dfn" href="#solid-server" id="ref-for-solid-server①">Solid server</a> implementing <span class="super">Per Resource Events Protocol</span> on an LDP Resource MUST accept <a href="https://cxres.github.io/prep/draft-gupta-httpbis-per-resource-events.html#request">requests</a> <a data-link-type="biblio" href="#biblio-prep" title="Per Resource Events">[PREP]</a> when the <code>accept</code> <a href="https://cxres.github.io/prep/draft-gupta-httpbis-per-resource-events.html#event-field">event-field</a> associated with the <code>PREP</code> list item in the <code><a href="https://cxres.github.io/prep/draft-gupta-httpbis-per-resource-events.html#accept-events">Accept-Events</a></code> header field indicates a preferred media type of <code>application/ld+json</code> <a data-link-type="biblio" href="#biblio-json-ld11" title="JSON-LD 1.1">[JSON-LD11]</a>.</p>
782-
<h2 class="heading settled" data-level="3" id="format"><span class="secno">3. </span><span class="content">Format</span><a class="self-link" href="#format"></a></h2>
781+
<p>A <a data-link-type="dfn" href="#solid-server" id="ref-for-solid-server①">Solid server</a> implementing <span class="super">Per Resource Events Protocol</span> on an LDP Resource MUST accept <a href="https://cxres.github.io/prep/draft-gupta-httpbis-per-resource-events.html#request">requests</a> <a data-link-type="biblio" href="#biblio-prep" title="Per Resource Events">[PREP]</a> when the <code>accept</code> <a href="https://cxres.github.io/prep/draft-gupta-httpbis-per-resource-events.html#event-field">event-field</a> associated with the <code>"prep"</code> list item in the <code><a href="https://cxres.github.io/prep/draft-gupta-httpbis-per-resource-events.html#accept-events">Accept-Events</a></code> header field indicates a preferred media type of <code>application/ld+json</code> <a data-link-type="biblio" href="#biblio-json-ld11" title="JSON-LD 1.1">[JSON-LD11]</a>.</p>
782+
<div class="example" id="example-51004d3e">
783+
<a class="self-link" href="#example-51004d3e"></a> <span class="marker">Request for Solid-PREP Notifications</span>
784+
<pre class="include-code">GET /John_Doe HTTP/1.1
785+
Host: example.com
786+
Accept-Encoding: application/ld+json
787+
Accept-Events: "prep"; accept=application/ld+json
788+
</pre>
789+
</div>
790+
<h2 class="heading settled" data-level="3" id="Response"><span class="secno">3. </span><span class="content">Response</span><a class="self-link" href="#Response"></a></h2>
783791
<p>A <a data-link-type="dfn" href="#solid-server" id="ref-for-solid-server②">Solid server</a> implementing <span class="super">Per Resource Events Protocol</span> on an LDP Resource MUST be able to transmit <span class="super-short">PREP</span> notifications using the <code>application/ld+json</code> <a data-link-type="biblio" href="#biblio-json-ld11" title="JSON-LD 1.1">[JSON-LD11]</a> media type. It MAY also support other media types to transmit <span class="super-short">PREP</span> notifications.</p>
792+
<div class="example" id="example-4f832688">
793+
<a class="self-link" href="#example-4f832688"></a> <span class="marker">Response with Solid-PREP Notifications</span>
794+
<pre class="include-code">HTTP/1.1 200 OK
795+
Accept: text/turtle, application/ld+json
796+
Accept-Events: "prep";accept=("message/rfc822" "application/ld+json")
797+
Events: protocol="prep", status=200, expires="Thu, 07 Nov 2024 15:13:48 GMT"
798+
Content-Type: multipart/mixed; boundary="main-boundary"
799+
800+
--main-boundary
801+
Content-Type: application/ld+json
802+
803+
{
804+
"@context": "https://json-ld.org/contexts/person.jsonld",
805+
"@id": "http://dbpedia.org/resource/John_Doe",
806+
"name": "John Doe"
807+
}
808+
809+
--main-boundary
810+
Content-Type: multipart/digest; boundary="notification-boundary"
811+
812+
--notification-boundary
813+
Content-Type: application/ld+json
814+
815+
{
816+
"published": "2024-11-10T11:12:13Z",
817+
"type": "Update",
818+
"object": "https://example.com/John_Doe",
819+
"state": "ABC123"
820+
"@context": [
821+
"https://www.w3.org/ns/activitystreams",
822+
"https://www.w3.org/ns/solid/notification/v1"
823+
]
824+
}
825+
826+
--notification-boundary
827+
Content-Type: application/ld+json
828+
829+
{
830+
"published": "2024-11-10T14:15:16Z",
831+
"type": "Delete",
832+
"object": "https://example.com/John_Doe",
833+
"state": "DEF456"
834+
"@context": [
835+
"https://www.w3.org/ns/activitystreams",
836+
"https://www.w3.org/ns/solid/notification/v1"
837+
]
838+
}
839+
840+
--notification-boundary--
841+
--main-boundary--
842+
</pre>
843+
</div>
784844
<h2 class="heading settled" data-level="4" id="triggers"><span class="secno">4. </span><span class="content">Triggers</span><a class="self-link" href="#triggers"></a></h2>
785845
<p>A <a data-link-type="dfn" href="#solid-server" id="ref-for-solid-server③">Solid server</a> implementing the <span class="super">Per Resource Events Protocol</span> on an LDP Resource SHOULD send a <span class="super-short">PREP</span> notification when the state of the said resource is modified.</p>
786846
<p>A <a data-link-type="dfn" href="#solid-server" id="ref-for-solid-server④">Solid server</a> MUST NOT transmit a <span class="super-short">PREP</span> notification before the resource has been modified and a confirmation (if necessary) has been sent to (but might not have been received by) the agent that initiated the resource modification.</p>
@@ -1158,7 +1218,7 @@ <h3 class="no-num no-ref heading settled" id="informative"><span class="content"
11581218
let dfnPanelData = {
11591219
"Solid-client—Solid-server-interoperability": {"dfnID":"Solid-client\u2014Solid-server-interoperability","dfnText":"Solid Client\u2014Solid Server Interoperability","external":false,"refSections":[{"refs":[{"id":"ref-for-Solid-client\u2014Solid-server-interoperability"}],"title":"Interoperability"}],"url":"#Solid-client\u2014Solid-server-interoperability"},
11601220
"solid-client": {"dfnID":"solid-client","dfnText":"Solid Client","external":false,"refSections":[{"refs":[{"id":"ref-for-solid-client"}],"title":"Interoperability"},{"refs":[{"id":"ref-for-solid-client\u2460"}],"title":"5.2. Extended Content"},{"refs":[{"id":"ref-for-solid-client\u2461"},{"id":"ref-for-solid-client\u2462"}],"title":"Security Considerations"}],"url":"#solid-client"},
1161-
"solid-server": {"dfnID":"solid-server","dfnText":"Solid Server","external":false,"refSections":[{"refs":[{"id":"ref-for-solid-server"}],"title":"Interoperability"},{"refs":[{"id":"ref-for-solid-server\u2460"}],"title":"2. Request"},{"refs":[{"id":"ref-for-solid-server\u2461"}],"title":"3. Format"},{"refs":[{"id":"ref-for-solid-server\u2462"},{"id":"ref-for-solid-server\u2463"},{"id":"ref-for-solid-server\u2464"},{"id":"ref-for-solid-server\u2465"},{"id":"ref-for-solid-server\u2466"},{"id":"ref-for-solid-server\u2467"}],"title":"4. Triggers"},{"refs":[{"id":"ref-for-solid-server\u2468"},{"id":"ref-for-solid-server\u2460\u24ea"}],"title":"5.1. Properties"},{"refs":[{"id":"ref-for-solid-server\u2460\u2460"}],"title":"5.2. Extended Content"},{"refs":[{"id":"ref-for-solid-server\u2460\u2461"}],"title":"6. Activity Mapping"},{"refs":[{"id":"ref-for-solid-server\u2460\u2462"},{"id":"ref-for-solid-server\u2460\u2463"}],"title":"Security Considerations"}],"url":"#solid-server"},
1221+
"solid-server": {"dfnID":"solid-server","dfnText":"Solid Server","external":false,"refSections":[{"refs":[{"id":"ref-for-solid-server"}],"title":"Interoperability"},{"refs":[{"id":"ref-for-solid-server\u2460"}],"title":"2. Request"},{"refs":[{"id":"ref-for-solid-server\u2461"}],"title":"3. Response"},{"refs":[{"id":"ref-for-solid-server\u2462"},{"id":"ref-for-solid-server\u2463"},{"id":"ref-for-solid-server\u2464"},{"id":"ref-for-solid-server\u2465"},{"id":"ref-for-solid-server\u2466"},{"id":"ref-for-solid-server\u2467"}],"title":"4. Triggers"},{"refs":[{"id":"ref-for-solid-server\u2468"},{"id":"ref-for-solid-server\u2460\u24ea"}],"title":"5.1. Properties"},{"refs":[{"id":"ref-for-solid-server\u2460\u2460"}],"title":"5.2. Extended Content"},{"refs":[{"id":"ref-for-solid-server\u2460\u2461"}],"title":"6. Activity Mapping"},{"refs":[{"id":"ref-for-solid-server\u2460\u2462"},{"id":"ref-for-solid-server\u2460\u2463"}],"title":"Security Considerations"}],"url":"#solid-server"},
11621222
};
11631223

11641224
document.addEventListener("DOMContentLoaded", ()=>{

0 commit comments

Comments
 (0)