summaryrefslogtreecommitdiff
path: root/session-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'session-test.sh')
-rwxr-xr-xsession-test.sh34
1 files changed, 33 insertions, 1 deletions
diff --git a/session-test.sh b/session-test.sh
index 4d767f1..d569d53 100755
--- a/session-test.sh
+++ b/session-test.sh
@@ -17,4 +17,36 @@ json_close_array
ubus call session grant "$(json_dump)"
echo "Session: $sid"
-wget -O- "http://localhost:8080/ubus/$sid/session/list"
+echo "Request 1"
+wget -q -O- \
+ --post-data='{
+ "jsonrpc": "2.0",
+ "method" : "call",
+ "params" : [
+ "session",
+ "test",
+ {},
+ ]
+ }' "http://localhost:8080/ubus/$sid/session/list"
+echo "Request 2"
+wget -q -O- \
+ --post-data='[
+ {
+ "jsonrpc": "2.0",
+ "method" : "call",
+ "params" : [
+ "session",
+ "list",
+ {},
+ ]
+ },
+ {
+ "jsonrpc": "2.0",
+ "method" : "call",
+ "params" : [
+ "session",
+ "test",
+ {},
+ ]
+ },
+ ]' "http://localhost:8080/ubus/$sid/session/list"