def get(self, request):
    headers = {key[5:].replace('_', '-'): value for (key, value) in request.META.items() if key.startswith('HTTP_')}
    return Response({'method': request.method, 'headers': headers})
def get(self, request):
    headers = {key[5:].replace('_', '-'): value for (key, value) in request.META.items() if key.startswith('HTTP_')}
    return Response({'method': request.method, 'headers': headers})