automated terminal push

This commit is contained in:
Software Shinobi committed 2025-04-30 07:38:19 -04:00
1 parent 58015ad4e9
commit 37a57278dd
25 files changed
+822 -7

No files matched your search

Binary file not shown.
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
reset
clear
set -e
set -x
# Define the API endpoint URL with root and path
API_URL="http://aventador.embanet.online:5000/complex_process"
# Data to send in JSON format
DATA='{"string": "test", "num1": 10, "num2": 20}'
# Send POST request using curl with provided data
response=$(curl -s -X POST -H "Content-Type: application/json" -d "$DATA" $API_URL)
# Check for successful response (exit code 0) and extract the result
if [[ $? -eq 0 ]]; then
result=$(echo $response | jq -r '.result')
echo "API responded successfully with result: $result"
else
echo "Error: API request failed!"
exit 1
fi
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
reset
clear
set -e
set -x
# Define the API endpoint URL with root and path
API_URL="http://aventador.embanet.online:5000/process"
# Data to send in JSON format
DATA='{"string": "test", "num1": 10, "num2": 20}'
# Send POST request using curl with provided data
response=$(curl -s -X POST -H "Content-Type: application/json" -d "$DATA" $API_URL)
# Check for successful response (exit code 0) and extract the result
if [[ $? -eq 0 ]]; then
result=$(echo $response | jq -r '.result')
echo "API responded successfully with result: $result"
else
echo "Error: API request failed!"
exit 1
fi