14 lines
462 B
Python
14 lines
462 B
Python
|
import requests
|
||
|
base = input('Enter URL of server instance (http://example.com): ')
|
||
|
device = input('Which input method are we managing?: ')
|
||
|
while True:
|
||
|
choice = input('Enter Participant ID (or quit): ')
|
||
|
if choice == 'quit':
|
||
|
break
|
||
|
r = requests.post(base + '/' + device + 'Post',data={'id':choice})
|
||
|
if r.status_code is 200:
|
||
|
print('Updated')
|
||
|
else:
|
||
|
print('Error occured')
|
||
|
print(r.status_code)
|
||
|
print(r.text)
|