I am currently using this clumsy way to check if a request is HTTP or HTTPS
def get_scheme(self, request):
if self.request.url.startswith('https:'):
scheme = 'https'
else:
scheme = 'http'
Is there a request.is_secure() method in Python Requests?