@@ -31,18 +31,17 @@ RESPONSE:
31
31
``` http
32
32
HTTP/1.1 200 OK
33
33
...
34
- Updates-Via: wss://example.org/?access_token=Ne3jiZ1Mei6Air6iefoh
34
+ Updates-Via: wss://example.org/
35
35
```
36
36
37
- The URL mentioned in the ` Updates-Via ` header should act as a [ capability] ( https://en.wikipedia.org/wiki/Capability-based_security ) .
38
37
To subscribe to a resource, clients will need to send the keyword ` sub ` followed
39
38
by an empty space and then the URI of the resource:
40
39
41
40
```
42
41
sub https://example.org/data/test
43
42
```
44
43
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
46
45
receive a WebSocket message composed of the keyword ` pub ` , followed by an empty
47
46
space and the URI of the resource that has changed:
48
47
@@ -51,10 +50,9 @@ pub https://example.org/data/test
51
50
```
52
51
53
52
Subscribing 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
55
54
a 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.
58
56
59
57
For example, a client subscribes to the ` data/ ` container:
60
58
@@ -77,10 +75,6 @@ Then the following notification message will be sent:
77
75
pub https://example.org/data/
78
76
```
79
77
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
-
84
78
Here is a Javascript example on how to subscribe to live updates for a ` test `
85
79
resource at ` https://example.org/data/test ` :
86
80
0 commit comments