/
requests
57 lines (35 loc) · 1.28 KB
/
requests
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
POST / HTTP/1.1
HOST:127.0.0.1:8000
Content-Length: 41
Content-Type: text/plain
Connection: close
{"action":"add_indexes", "indexes":[5,6]}
POST / HTTP/1.1
HOST:127.0.0.1:8000
Content-Length: 50
Content-Type: text/plain
{"action":"matching", "indexes":[5], "scenario":2}
POST / HTTP/1.1
HOST:127.0.0.1:8000
Content-Length: 69
Content-Type: text/plain
{"action":"matching", "indexes":[5], "scenario":2, "flags":{"mma":5}}
POST / HTTP/1.1
HOST:127.0.0.1:8000
Content-Length: 70
Content-Type: text/plain
{"action":"matching", "indexes":[5], "scenario":2, "flags":{"mma":18}}
POST / HTTP/1.1
HOST:127.0.0.1:8000
Content-Length: 80
Content-Type: text/plain
{"action":"matching", "indexes":[5], "scenario":2, "flags":{"mma":10, "mr":0.5}}
POST / HTTP/1.1
HOST:127.0.0.1:8000
Content-Length: 4
Content-Type: text/plain
stop
CURL
time curl -X POST -H "Content-Type: application/json" -d '{"indexes":[5,6], "action":"add_indexes"}' --connect-timeout 10 -lv http://127.0.0.1:8080/
time curl -X POST -H "Content-Type: application/json" -d '{"indexes":[5,6], "action":"update_indexes"}' --connect-timeout 10 -lv http://127.0.0.1:8080/
time curl -X POST -H "Content-Type: application/json" -d '{"indexes":[5], "action":"matching", "scenario":2}' --connect-timeout 10 -lv http://127.0.0.1:8080/