add Content-Type for index request; make rest api for es file