-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrequests_parallel.sh
executable file
·30 lines (29 loc) · 2.92 KB
/
requests_parallel.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
26
27
28
29
30
PORT=${PORT:=3000}
# invoke (in parallel) a bunch of different requests containing valid authorization header
curl --header "authorization: 1" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 2" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 3" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 4" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 3" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 99999" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 2" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 2" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 4" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 2" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 3" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 9999" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 1" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 1" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 2" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 3" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 99999" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 3" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 3" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 2" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 2" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 99999" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 2" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 3" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 1" --header "content-type: application/json" http://localhost:$PORT/api/users &
curl --header "authorization: 99999" --header "content-type: application/json" http://localhost:$PORT/api/users &
wait