From 3afe8260594d7c903fc0276d69ced63be5a22c45 Mon Sep 17 00:00:00 2001 From: bra-fsn <820331+bra-fsn@users.noreply.github.com> Date: Sat, 10 Mar 2018 14:36:44 +0100 Subject: [PATCH] Correct agent/service/deregister call to be a PUT According to https://www.consul.io/api/agent/service.html /v1/agent/service/deregister should be a PUT, not a GET operation. --- consul/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consul/base.py b/consul/base.py index 09203b6d..143a4953 100755 --- a/consul/base.py +++ b/consul/base.py @@ -886,7 +886,7 @@ def deregister(self, service_id): take care of deregistering the service with the Catalog. If there is an associated check, that is also deregistered. """ - return self.agent.http.get( + return self.agent.http.put( CB.bool(), '/v1/agent/service/deregister/%s' % service_id) def maintenance(self, service_id, enable, reason=None):