Update outage requests to PATCH

This commit is contained in:
agatha 2023-09-08 16:04:01 -04:00
parent 72ff3612d4
commit 5ac9007a18

View File

@ -50,7 +50,7 @@ disable_latency() {
enable_outage() { enable_outage() {
if (( OUTAGE_ENABLED == 0 )); then if (( OUTAGE_ENABLED == 0 )); then
echo "enabling outage..." 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 "enabled": false
}' > /dev/null }' > /dev/null
OUTAGE_ENABLED=1 OUTAGE_ENABLED=1
@ -60,7 +60,7 @@ enable_outage() {
disable_outage() { disable_outage() {
if (( OUTAGE_ENABLED == 1 )); then if (( OUTAGE_ENABLED == 1 )); then
echo "disabling outage..." 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 "enabled": true
}' > /dev/null }' > /dev/null
OUTAGE_ENABLED=0 OUTAGE_ENABLED=0