Reworking HTTP-to-ES part (incomplete). Started ES-to-HTTP part