mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
renamed devel dir
This commit is contained in:
21
testingTools/tests/testScripts/postTestData.sh
Executable file
21
testingTools/tests/testScripts/postTestData.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
url=$(head -n 1 ../serverAddress)
|
||||
# url='https://api.frylabs.net'
|
||||
echo "Server url: $url"
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "1 param required: json to send to localhost, got $#"
|
||||
else
|
||||
data=$(tr -d '\n' <"$1" | awk '$1=$1')
|
||||
# data=$(node -e "console.log(encodeURIComponent('$data'));")
|
||||
echo sending
|
||||
echo "SENT DATA:"
|
||||
../bin/hr.sh
|
||||
echo "$data"
|
||||
../bin/hr.sh
|
||||
curl \
|
||||
--cookie "sessionID=e0ac328d-86cc-4dbf-a00b-213bec6011e7" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST --data "$data" \
|
||||
"$url/isAdding"
|
||||
fi
|
||||
Reference in New Issue
Block a user