@@ -31,18 +31,17 @@ RESPONSE:
3131``` http
3232HTTP/1.1 200 OK
3333...
34- Updates-Via: wss://example.org/?access_token=Ne3jiZ1Mei6Air6iefoh
34+ Updates-Via: wss://example.org/
3535```
3636
37- The URL mentioned in the ` Updates-Via ` header should act as a [ capability] ( https://en.wikipedia.org/wiki/Capability-based_security ) .
3837To subscribe to a resource, clients will need to send the keyword ` sub ` followed
3938by an empty space and then the URI of the resource:
4039
4140```
4241sub https://example.org/data/test
4342```
4443
45- If a change occurs and the client is subscribed to that resource and has Read access to it , it will
44+ If a change occurs and the client is subscribed to that resource, it will
4645receive a WebSocket message composed of the keyword ` pub ` , followed by an empty
4746space and the URI of the resource that has changed:
4847
@@ -51,10 +50,9 @@ pub https://example.org/data/test
5150```
5251
5352Subscribing to a container can also be really useful, since all CRUD operations
54- (POST, PUT, PATCH, DELETE) performed on member resources of that container will trigger
53+ (POST, PUT, PATCH, DELETE) performed on resources of that container will trigger
5554a notification for the container URI. This makes synchronization between
56- multiple apps really easy. It only affects the parent container, of which the resource is a member,
57- not further ancestor containers.
55+ multiple apps really easy.
5856
5957For example, a client subscribes to the ` data/ ` container:
6058
@@ -77,10 +75,6 @@ Then the following notification message will be sent:
7775pub https://example.org/data/
7876```
7977
80- The server may send additional informational messages for e.g. error reporting,
81- as long as they don't start with ` pub ` .
82- If a client subscribes to too many updates, the server may close the socket.
83-
8478Here is a Javascript example on how to subscribe to live updates for a ` test `
8579resource at ` https://example.org/data/test ` :
8680
0 commit comments