use of org.openhab.binding.homeconnect.internal.client.model.ApiRequest in project openhab-addons by openhab.
the class HomeConnectServlet method getRequestLogPage.
private void getRequestLogPage(HttpServletRequest request, HttpServletResponse response) throws IOException {
ArrayList<ApiRequest> requests = new ArrayList<>();
bridgeHandlers.forEach(homeConnectBridgeHandler -> requests.addAll(homeConnectBridgeHandler.getApiClient().getLatestApiRequests()));
WebContext context = new WebContext(request, response, request.getServletContext());
context.setVariable("bridgeHandlers", bridgeHandlers);
context.setVariable("requests", gson.toJson(requests));
templateEngine.process("log-requests", context, response.getWriter());
}
Aggregations