summary refs log tree commit diff
path: root/docs/model/protocol_examples.rst
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-08-28 09:45:05 +0100
committerKegan Dougal <kegan@matrix.org>2014-08-28 09:45:05 +0100
commit660129deb1bb60dac04ff59d1da8bbe53882149e (patch)
tree79ca7c082e24e3039e75b3c0457cebd8a564f99a /docs/model/protocol_examples.rst
parentFix up the various presence-related tests so that if they're not skipped, the... (diff)
downloadsynapse-660129deb1bb60dac04ff59d1da8bbe53882149e.tar.xz
Shuffle files around in /docs
Diffstat (limited to 'docs/model/protocol_examples.rst')
-rw-r--r--docs/model/protocol_examples.rst64
1 files changed, 64 insertions, 0 deletions
diff --git a/docs/model/protocol_examples.rst b/docs/model/protocol_examples.rst
new file mode 100644
index 0000000000..61a599b432
--- /dev/null
+++ b/docs/model/protocol_examples.rst
@@ -0,0 +1,64 @@
+PUT /send/abc/ HTTP/1.1
+Host: ...
+Content-Length: ...
+Content-Type: application/json
+
+{
+    "origin": "localhost:5000",
+    "pdus": [
+        {
+            "content": {},
+            "context": "tng",
+            "depth": 12,
+            "is_state": false,
+            "origin": "localhost:5000",
+            "pdu_id": 1404381396854,
+            "pdu_type": "feedback",
+            "prev_pdus": [
+                [
+                    "1404381395883",
+                    "localhost:6000"
+                ]
+            ],
+            "ts": 1404381427581
+        }
+    ],
+    "prev_ids": [
+        "1404381396852"
+    ],
+    "ts": 1404381427823
+}
+
+HTTP/1.1 200 OK
+...
+
+======================================
+
+GET /pull/-1/ HTTP/1.1
+Host: ...
+Content-Length: 0
+
+HTTP/1.1 200 OK
+Content-Length: ...
+Content-Type: application/json
+
+{
+    origin: ...,
+    prev_ids: ...,
+    data: [
+        {
+            data_id: ...,
+            prev_pdus: [...],
+            depth: ...,
+            ts: ...,
+            context: ...,
+            origin: ...,
+            content: {
+                ...
+            }
+        },
+        ...,
+    ]
+}
+
+