From 5ac9007a18c90a6683d833a000ac23edab009fa2 Mon Sep 17 00:00:00 2001 From: agatha Date: Fri, 8 Sep 2023 16:04:01 -0400 Subject: [PATCH] Update outage requests to PATCH --- toxiproxy/toxify.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toxiproxy/toxify.sh b/toxiproxy/toxify.sh index 2822f06..0db403e 100644 --- a/toxiproxy/toxify.sh +++ b/toxiproxy/toxify.sh @@ -50,7 +50,7 @@ disable_latency() { enable_outage() { if (( OUTAGE_ENABLED == 0 )); then echo "enabling outage..." - curl -s -X POST http://toxiproxy:8474/proxies/$SERVICE_NAME -d'{ + curl -s -X PATCH http://toxiproxy:8474/proxies/$SERVICE_NAME -d'{ "enabled": false }' > /dev/null OUTAGE_ENABLED=1 @@ -60,7 +60,7 @@ enable_outage() { disable_outage() { if (( OUTAGE_ENABLED == 1 )); then echo "disabling outage..." - curl -s -X POST http://toxiproxy:8474/proxies/$SERVICE_NAME -d'{ + curl -s -X PATCH http://toxiproxy:8474/proxies/$SERVICE_NAME -d'{ "enabled": true }' > /dev/null OUTAGE_ENABLED=0