-
Notifications
You must be signed in to change notification settings - Fork 4
/
curldemo.sh
executable file
·25 lines (20 loc) · 810 Bytes
/
curldemo.sh
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
#!/bin/bash
### !! this could inundate your redis db
# curl demo
# set and get
curl -w '\n' http://127.0.0.1:8888/get/noexisting
curl -w '\n' http://127.0.0.1:8888/set/noexisting/42
curl -w '\n' http://127.0.0.1:8888/get/noexisting
curl -w '\n' http://127.0.0.1:8888/set/a:a/42
curl -w '\n' http://127.0.0.1:8888/set/a:b/gnupower!
curl -w '\n' http://127.0.0.1:8888/get/a:b
# scan
curl -w '\n' http://127.0.0.1:8888/scan/0/match/a:*
# rpush, llen and lrange
curl -w '\n' http://127.0.0.1:8888/rpush/tinywebdis/lua
curl -w '\n' http://127.0.0.1:8888/rpush/tinywebdis/dyad
curl -w '\n' http://127.0.0.1:8888/rpush/tinywebdis/redis
curl -w '\n' http://127.0.0.1:8888/llen/tinywebdis
curl -w '\n' http://127.0.0.1:8888/lrange/tinywebdis/0/-1
# jsonp
curl -w '\n' http://127.0.0.1:8888/get/a:b?callback=myfunc