You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
340 B
Python
14 lines
340 B
Python
7 months ago
|
import requests
|
||
|
|
||
|
nuc_ip = '192.168.178.52'
|
||
|
url = f'http://{nuc_ip}:9713/osiris_execute'
|
||
|
|
||
|
command = "testcommand"
|
||
|
|
||
|
response = requests.post(url, json={'command': command})
|
||
|
|
||
|
if response.status_code == 200:
|
||
|
result = response.json()
|
||
|
print('Response:', result.get('message'))
|
||
|
else:
|
||
|
print('Failed to execute script:', response.json())
|