code: def get_authorization_header(request):
      
      auth = request.META.get('HTTP_AUTHORIZATION', b'')
  
      if isinstance(auth, type('')):
          # Work around django test client oddness
          auth = auth.encode('iso-8859-1')
  
      return auth
docs: Return request's 'Authorization:' header, as a bytestring.
      From: https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/authentication.py