Package com.codeforces.graygoose.model

Examples of com.codeforces.graygoose.model.Response


        return runValidation();
    }

    @Action("downloadResponse")
    public void onDownloadResponse() {
        Response response = responseDao.find(responseId);
        HttpServletResponse httpServletResponse = getResponse();

        if (response != null) {
            try {
                IOUtils.write(response.getText(), httpServletResponse.getWriter());
            } catch (IOException e) {
                // No operations.
            }
        }
    }
View Full Code Here


    }

    @Action("checkRule")
    public void onCheckRule() {
        try {
            Response response = Response.newResponse(
                    getString("url"), getInteger("responseCode"), getString("responseText"));

            String errorMessage = ResponseCheckingService.getErrorMessageOrNull(
                    getString("siteName"), response, ruleDao.find(getLong("ruleId")));
View Full Code Here

        printTemplateMapAsStringsUsingJson("success", "error");
    }

    @Action("fetch")
    public void onFetch() {
        Response response = UrlUtil.fetchUrl(getString("url"), 1);

        put("responseCode", response.getCode());
        put("responseText", response.getText());
        put("success", true);

        printTemplateMapAsStringsUsingJson("success", "error", "responseCode", "responseText");
    }
View Full Code Here

TOP

Related Classes of com.codeforces.graygoose.model.Response

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.