forked from lu28282/perl-to-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcurls.sh
executable file
·45 lines (38 loc) · 871 Bytes
/
curls.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
curl localhost:8099/hello
echo ""
curl localhost:8080/java-war/health
echo ""
json_payload_perl_only_method=$(cat <<EOF
{
"jsonrpc": "1.1",
"id": "42",
"method": "getTnbList",
"params": {
"number": "V001"
},
"by-the-way": "this is a call from a e2e test"
}
EOF
)
curl -X POST "localhost:8099/jsonrpc" \
-H "Content-Type: application/json, charset=utf-8" \
-d "$json_payload_perl_only_method"
echo ""
json_payload_java_only_method=$(cat <<EOF
{
"jsonrpc": "1.1",
"id": "42",
"method": "javaTest",
"params": {
"id": 1,
"name": "acul",
"temperatureOver20Degree": true
},
"by-the-way": "this is a call from a e2e test"
}
EOF
)
curl -X POST "localhost:8099/jsonrpc" \
-H "Content-Type: application/json, charset=utf-8" \
-d "$json_payload_java_only_method"