removed trailing spaces
This commit is contained in:
@ -4,7 +4,7 @@ import json
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from .authmixin import AuthMixin, AuthError, HEADER_JSON
|
||||
|
||||
|
||||
def authenticated(func):
|
||||
@functools.wraps(func)
|
||||
def authenticated_call(*args, **kwargs):
|
||||
@ -43,12 +43,12 @@ class HttpClient(AuthMixin):
|
||||
response = requests.get(url, params=params, headers=headers, timeout=timeout, verify=self._verify_certificate)
|
||||
if response.ok:
|
||||
return response.json()
|
||||
else:
|
||||
else:
|
||||
if response.reason == "Unauthorized":
|
||||
self.config.delete()
|
||||
raise response.raise_for_status()
|
||||
|
||||
|
||||
|
||||
@authenticated
|
||||
def post_request(self, url, payload=None, headers=None, timeout=10):
|
||||
response = requests.post(url, json=payload, headers=headers, timeout=timeout, verify=self._verify_certificate).json()
|
||||
|
Reference in New Issue
Block a user