chore: update landerctl to use location header

c-web-server
Jef Roosens 2023-05-31 13:03:14 +02:00
parent 5d0cafbc27
commit eff1b13065
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
2 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,7 @@ if [ "$1" = g ]; then
elif [ "$1" = s ]; then
curl \
-w "${URL}%header{location}" \
-XPOST \
-d "$2" \
-H "X-Api-Key: $API_KEY" \
@ -16,6 +17,7 @@ elif [ "$1" = s ]; then
elif [ "$1" = sl ]; then
curl \
-w "${URL}%header{location}" \
-XPOST \
-d "$2" \
-H "X-Api-Key: $API_KEY" \
@ -23,6 +25,7 @@ elif [ "$1" = sl ]; then
elif [ "$1" = p ]; then
curl \
-w "${URL}%header{location}" \
-XPOST \
-H "X-Api-Key: $API_KEY" \
--data-binary @"$2" \
@ -30,6 +33,7 @@ elif [ "$1" = p ]; then
elif [ "$1" = pl ]; then
curl \
-w "${URL}%header{location}" \
-XPOST \
-H "X-Api-Key: $API_KEY" \
--data-binary @"$2" \

View File

@ -24,5 +24,5 @@ int main() {
gctx->api_key = "test";
event_loop *el = http_loop_init(gctx);
http_loop_run(el, 8000);
http_loop_run(el, 18080);
}