summary refs log tree commit diff
path: root/docs/protocol_examples
blob: 61a599b432738a533d7ae7f46ce1b96b0daaf72b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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: {
                ...
            }
        },
        ...,
    ]
}