From eff1b13065a464fa961eb460d54f6bedc8094e3a Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Wed, 31 May 2023 13:03:14 +0200 Subject: [PATCH] chore: update landerctl to use location header --- landerctl | 4 ++++ src/main.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/landerctl b/landerctl index 52b0dcc..c0433a5 100755 --- a/landerctl +++ b/landerctl @@ -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" \ diff --git a/src/main.c b/src/main.c index 99f6f91..b69931d 100644 --- a/src/main.c +++ b/src/main.c @@ -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); }