Skip to content

Commit

Permalink
Merge pull request #20 from kiali/kiali-2164
Browse files Browse the repository at this point in the history
KIALI-2164 Include Support for DELETE method
  • Loading branch information
mattmahoneyrh authored Dec 14, 2018
2 parents 9559fe1 + b5639c7 commit 6c9d1c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions kiali/api_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def dispatcher(self, url, params=None, http_method='GET', data=None):
if http_method is 'PATCH':
return self.patch(url=url, params=params, data=data)

if http_method is 'DELETE':
return self.delete(url=url, params=params, data=data)


def get(self, url, params=None):
session = self.create_session()
Expand All @@ -44,6 +47,10 @@ def patch(self, url, data, params=None):
session = self.create_session()
return session.patch(url=self.retrieve_url(url), data=data, params=params)

def delete(self, url, data, params=None):
session = self.create_session()
return session.delete(url=self.retrieve_url(url), data=data, params=params)


class KialiHTTPSApiConnector(KialiApiConnector):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="kiali-client",
version="0.6.0",
version="0.6.1",
author="Guilherme Baufaker Rego",
author_email="gbaufake@redhat.com",
description="Python client to communicate with Kiali server over HTTP(S)",
Expand Down

0 comments on commit 6c9d1c9

Please sign in to comment.