Fix missing header
This commit is contained in:
parent
b33f23b4c9
commit
62a23fac4f
|
|
@ -32,7 +32,7 @@
|
||||||
<p>Haben Sie noch kein hep Konto?</p>
|
<p>Haben Sie noch kein hep Konto?</p>
|
||||||
<a
|
<a
|
||||||
class="hep-link"
|
class="hep-link"
|
||||||
href="https://cms.hep-verlag.ch/register"
|
href="/api/oauth/login/"
|
||||||
data-cy="oauth-login">Jetzt registrieren</a>
|
data-cy="oauth-login">Jetzt registrieren</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,14 @@ class HepClient:
|
||||||
|
|
||||||
def _call(self, url, token_dict, method='get', data=None):
|
def _call(self, url, token_dict, method='get', data=None):
|
||||||
|
|
||||||
|
headers = {"accept": "application/json"}
|
||||||
|
|
||||||
if method == 'post':
|
if method == 'post':
|
||||||
response = oauth.hep.post(url, json=data, token=token_dict)
|
response = oauth.hep.post(url, json=data, token=token_dict, headers=headers)
|
||||||
elif method == 'get':
|
elif method == 'get':
|
||||||
response = oauth.hep.get(url, params=data, token=token_dict)
|
response = oauth.hep.get(url, params=data, token=token_dict, headers=headers)
|
||||||
elif method == 'put':
|
elif method == 'put':
|
||||||
response = oauth.hep.put(url, data=data, token=token_dict)
|
response = oauth.hep.put(url, data=data, token=token_dict, headers=headers)
|
||||||
|
|
||||||
return self._handle_response(response)
|
return self._handle_response(response)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue