mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added uri encoding to postTestData test script
This commit is contained in:
parent
c7f3b405e9
commit
113120c00a
1 changed files with 5 additions and 1 deletions
|
@ -6,10 +6,14 @@ if [ "$#" -ne 1 ]; then
|
||||||
echo "1 param required: json to send to localhost, got $#"
|
echo "1 param required: json to send to localhost, got $#"
|
||||||
else
|
else
|
||||||
data=$(tr -d '\n' <"$1" | awk '$1=$1')
|
data=$(tr -d '\n' <"$1" | awk '$1=$1')
|
||||||
|
# data=$(node -e "console.log(encodeURIComponent('$data'));")
|
||||||
echo sending
|
echo sending
|
||||||
echo "SENT DATA:"
|
echo "SENT DATA:"
|
||||||
../bin/hr.sh
|
../bin/hr.sh
|
||||||
echo "$data"
|
echo "$data"
|
||||||
../bin/hr.sh
|
../bin/hr.sh
|
||||||
curl -X POST --data "datatoadd=$data" "$url/isAdding"
|
curl \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-X POST --data "$data" \
|
||||||
|
"$url/isAdding"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue