Skip to content

Instantly share code, notes, and snippets.

@Allwin12
Created September 4, 2020 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Allwin12/e22cbd0d340fed1677e8567fe002031c to your computer and use it in GitHub Desktop.
Save Allwin12/e22cbd0d340fed1677e8567fe002031c to your computer and use it in GitHub Desktop.
class SampleView(APIView):
def get(self, request):
token = request.META.get('HTTP_AUTHORIZATION')
access_token = token.split()[-1]
print(access_token)
return Response({'token': access_token})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment