def _get_request_header(request, header_name, default=''):
 if ((request is not None) and hasattr(request, 'META') and (header_name in request.META)):
  return request.META[header_name]
 else:
  return default

def _get_request_header ( request , header_name , default = '' ) : if ( ( request is not None ) and hasattr ( request , 'META' ) and ( header_name in request . META ) ) : return request . META [ header_name ] else : return default
helper method to get header values from a requests meta dict .