generated from kc3hack/2023_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
40 lines (31 loc) · 907 Bytes
/
script.js
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
import http from 'k6/http';
import {sleep, check} from 'k6';
export default function () {
const data = {
user_uuid: "linebot12",
room_number: "1"
}
const data2 = {
reaction: "ok",
user_uuid: "551nikuman",
pin_uuid: "commit44"
}
const data3 = {
user_uuid: "wind",
}
const payload = JSON.stringify(data);
const payload2 = JSON.stringify(data2)
const payload3 = JSON.stringify(data3)
const params = {
headers: {
'Content-Type': 'application/json;charset=UTF-8',
}
};
const url = 'http://itoho.ddns.net:5000/arpinpolling'
const url2 = 'http://itoho.ddns.net:5000/arreactionpolling'
const url3 = 'http://itoho.ddns.net:5000/reactionadd'
http.post(url, payload, params);
// http.post(url3, payload2, params);
http.post(url2, payload3, params);
sleep(0.1)
}