diff options
author | Erik Johnston <erik@matrix.org> | 2014-09-12 18:19:32 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-09-12 18:19:32 +0100 |
commit | e3aec9bc818e203a4883f8863acb96b9c273112a (patch) | |
tree | 762f87365f917f510f00bc6aee7a4068cdd56e76 /docs/client-server/model/protocol_examples.rst | |
parent | fix embarassing bug where in-progress messages get vaped when the previous on... (diff) | |
parent | Bump version and change log (diff) | |
download | synapse-e3aec9bc818e203a4883f8863acb96b9c273112a.tar.xz |
Merge branch 'release-v0.2.3' of github.com:matrix-org/synapse
Conflicts: webclient/room/room-controller.js
Diffstat (limited to 'docs/client-server/model/protocol_examples.rst')
-rw-r--r-- | docs/client-server/model/protocol_examples.rst | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/docs/client-server/model/protocol_examples.rst b/docs/client-server/model/protocol_examples.rst new file mode 100644 index 0000000000..61a599b432 --- /dev/null +++ b/docs/client-server/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: { + ... + } + }, + ..., + ] +} + + |