Package yalp.mvc.Http

Examples of yalp.mvc.Http.Header


        @Override
        public List<Header> getHeaders() {
            Map<String, List<String>> hdrs = response.getHeaders();
            List<Header> result = new ArrayList<Header>();
            for (String key : hdrs.keySet()) {
                result.add(new Header(key, hdrs.get(key)));
            }
            return result;
        }
View Full Code Here


                response.print("Application is not started");
                response.status = 503;
                return true;
            }
            response.contentType = request.path.contains(".json") ? "application/json" : "text/plain";
            Header authorization = request.headers.get("authorization");
            if (authorization != null && (Crypto.sign("@status").equals(authorization.value()) || System.getProperty("statusKey", Yalp.secretKey).equals(authorization.value()))) {
                response.print(computeApplicationStatus(request.path.contains(".json")));
                response.status = 200;
                return true;
            }
            response.status = 401;
View Full Code Here

        @Override
        public List<Header> getHeaders() {
            List<Header> result = new ArrayList<Header>();
            for (String key : headersMap.keySet()) {
                result.add(new Header(key, headersMap.get(key)));
            }
            return result;
        }
View Full Code Here

  }

  private Request getRequest(String remoteAddress, String xForwardedFor) {
        Map<String, Header> headers = new HashMap<String, Header>();

        Header header = new Header();
        header.name = HEADER_XFORWARDED_FOR;
        header.values = Arrays.asList(new String[]{xForwardedFor});

        headers.put(HEADER_XFORWARDED_FOR, header);
View Full Code Here

TOP

Related Classes of yalp.mvc.Http.Header

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.