X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=session-test.sh;h=bfe665750e91856aba9e12451a9f859d530d44b6;hb=b0ac713bef656102c722ab472753c17aa15fcf93;hp=4d767f1af5cc40c69aaaf6d275883d03c96f9dc4;hpb=f8573c7b4c3a9e1a67cae787690f27a976aee11c;p=project%2Fuhttpd.git diff --git a/session-test.sh b/session-test.sh index 4d767f1..bfe6657 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" +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"