package org.elasticsearch.plugin.distfs.rest;


import org.elasticsearch.client.Client;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.rest.*;

import static org.elasticsearch.rest.RestRequest.Method.GET;

public class ResponseHandler extends BaseRestHandler {

    @Inject
    public ResponseHandler(Settings settings, Client client, RestController controller) {
        super(settings, controller, client);

        // Define REST endpoints
        controller.registerHandler(GET, "/_distfs/", this);
        controller.registerHandler(GET, "/_distfs/{name}", this);
    }

    @Override
    protected void handleRequest(RestRequest request, RestChannel channel, Client client) throws Exception {
        logger.debug("ResponseHandler called ");


    }
}

@@ -273,16 +273,68 @@
 hod.GET;
+%0Aimport static org.elasticsearch.rest.RestStatus.OK;
 %0A%0Apublic
@@ -868,14 +868,224 @@
 lled
- 
 %22);%0A%0A
+        BytesRestResponse restResponse = new BytesRestResponse(OK, %22text/html%22, %22%3Chtml%3E%3Chead%3E%3Ctitle%3EDistFS active%3C/title%3E%3C/head%3E%3Cbody%3EDistFS is active%3C/body%3E%3C/html%3E%22);%0A        channel.sendResponse(restResponse);
 %0A   

Add first response (text/html)