-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.py
23 lines (17 loc) · 829 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import requests
import sys
if(len(sys.argv)>1):
for country in sys.argv[1:]:
responeCases = requests.get('http://localhost:8080/newCasesPeak?country=' + country)
print(responeCases.text)
responeDeaths = requests.get('http://localhost:8080/deathsPeak?country=' + country)
print(responeDeaths.text)
responeRecover = requests.get('http://localhost:8080/recoveredPeak?country=' + country)
print(responeRecover.text)
else: #In case no country insert
responeCases = requests.get('http://localhost:8080/newCasesPeak')
print(responeCases.text)
responeDeaths = requests.get('http://localhost:8080/deathsPeak')
print(responeDeaths.text)
responeRecover = requests.get('http://localhost:8080/recoveredPeak')
print(responeRecover.text)