package controllers;
import play.libs.concurrent.HttpExecutionContext;
import play.mvc.*;
import play.twirl.api.Html;
import javax.inject.Inject;
import java.util.concurrent.CompletionStage;
import static java.util.concurrent.CompletableFuture.supplyAsync;
/**
* This controller contains an action to handle HTTP requests
* to the application's home page.
*/
public class HomeController extends Controller {
private HttpExecutionContext ec;
@Inject
public HomeController(HttpExecutionContext ec) {
this.ec = ec;
}
/**
* An action that renders an HTML page with a welcome message.
* The configuration in the routes
file means that
* this method will be called when the application receives a
* GET
request with a path of /
.
*/
public Result index() {
return ok(views.html.index.render());
}
public Result applyHtml() {
return ok(Html.apply("