add plugin op for uh_chunk_printf
[project/uhttpd.git] / session-test.sh
1 #!/usr/bin/env bash
2 . /usr/share/libubox/jshn.sh
3
4 json_load "$(ubus call session create)"
5 json_get_var sid sid
6
7
8 json_init
9 json_add_string sid "$sid"
10 json_add_array "objects"
11 json_add_array ""
12 json_add_string "" "session"
13 json_add_string "" "list"
14 json_close_array
15 json_close_array
16
17 ubus call session grant "$(json_dump)"
18
19 echo "Session: $sid"
20 wget -O- "http://localhost:8080/ubus/$sid/session/list"