diff --git a/cloudflare_v4/__init__.py b/cloudflare_v4/__init__.py index 46238a0..a16073d 100644 --- a/cloudflare_v4/__init__.py +++ b/cloudflare_v4/__init__.py @@ -48,7 +48,10 @@ def call(self, method, main_endpoint, endpoint=None, params=None, data=None): elif method == 'POST': response = requests.post(url, headers=headers, json=data) elif method == 'DELETE': - response = requests.delete("%s/%s" % (url, data), headers=headers) + if data: + response = requests.delete(url, headers=headers, json=data) + else: + response = requests.delete(url, headers=headers) elif method == 'PATCH': pass else: