From b863e9c9b1e2b0020676e39905fab3fec7af3378 Mon Sep 17 00:00:00 2001 From: Jakub K Date: Mon, 22 Jan 2024 22:02:28 +0100 Subject: [PATCH] =?UTF-8?q?przekazanie=20do=20sekret=C3=B3w=20do=20env=20-?= =?UTF-8?q?=20test=20only=20///=20append=20slash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jobposting/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jobposting/views.py b/jobposting/views.py index 761ad1c..82c75a2 100644 --- a/jobposting/views.py +++ b/jobposting/views.py @@ -93,10 +93,11 @@ class GetAuthTokenView(APIView): def post(self, request): client_id = settings.REACT_CLIENT_ID client_secret = settings.REACT_CLIENT_SECRET + headers = {'Content-Type': 'application/x-www-form-urlencoded'} data = { 'grant_type': 'client_credentials', 'client_id': client_id, 'client_secret': client_secret, } - response = requests.post('http://izaac.izaac.pl/o/token/', data=data) + response = requests.post('http://izaac.izaac.pl/o/token/', data=data, headers=headers) return Response(response.json()) \ No newline at end of file