Created
September 4, 2020 14:17
-
-
Save Allwin12/e22cbd0d340fed1677e8567fe002031c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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