automated terminal push

This commit is contained in:
2025-04-30 07:38:19 -04:00
committed by Software Shinobi
parent bff195d5fe
commit 5bfbd57097
25 changed files with 822 additions and 7 deletions

Binary file not shown.

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
.recycle/test/test.bash Normal file
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