@Override public void handle(ActionContext context) { JSONObject json = JSON.parseObject(context.body()); JSONArray fixtures = json.getJSONArray("fixtures"); test.loadFixtures((List) fixtures); H.Response resp = context.resp(); resp.status(H.Status.OK); resp.commit(); }
@Override public void handle(ActionContext context) { JSONObject json = JSON.parseObject(context.body()); JSONArray fixtures = json.getJSONArray("fixtures"); e2e.loadFixtures((List) fixtures); H.Response resp = context.resp(); resp.status(H.Status.OK); resp.commit(); }
@Override public void handle(ActionContext context) { JSONObject json = JSON.parseObject(context.body()); JSONArray fixtures = json.getJSONArray("fixtures"); test.loadFixtures((List) fixtures); H.Response resp = context.resp(); resp.status(H.Status.OK); resp.commit(); }
@Override public void apply(H.Request req, H.Response resp) { try { applyCookies(resp); applyHeaders(resp); resp.contentType(contentType); if (!resp.containsHeader(CONTENT_DISPOSITION)) { resp.contentDisposition(null, true); } applyStatus(resp); applyBeforeCommitHandler(req, resp); Img.source(img).writeTo(resp.outputStream(), contentType); } catch (Exception e) { throw E.unexpected(e); } finally { try { resp.commit(); applyAfterCommitHandler(req, resp); } finally { clearThreadLocals(); } } }
@Override public void apply(H.Request req, H.Response resp) { try { applyCookies(resp); applyHeaders(resp); resp.contentType(contentType); if (!resp.containsHeader(CONTENT_DISPOSITION)) { resp.contentDisposition(null, true); } applyStatus(resp); applyBeforeCommitHandler(req, resp); Img.source(img).writeTo(resp.outputStream(), contentType); } catch (Exception e) { throw E.unexpected(e); } finally { try { resp.commit(); applyAfterCommitHandler(req, resp); } finally { clearThreadLocals(); } } }
@Override public void handle(ActionContext context) { e2e.clearFixtures(); H.Response resp = context.resp(); resp.status(H.Status.NO_CONTENT); resp.commit(); }
@Override public void handle(ActionContext context) { test.clearFixtures(); H.Response resp = context.resp(); resp.status(H.Status.NO_CONTENT); resp.commit(); }
@Override public void handle(ActionContext context) { test.clearFixtures(); H.Response resp = context.resp(); resp.status(H.Status.NO_CONTENT); resp.commit(); }