Package org.vertx.java.core.http

Examples of org.vertx.java.core.http.HttpServerResponse.headers()


      super.handleRequest();
    } else {
      final Buffer buffer = new Buffer(0);
      final HttpServerResponse res = request.response();
      String origin = request.headers().get("ORIGIN");
      MultiMap resHeaders = res.headers();
      resHeaders.add("Content-Length", String.valueOf(1));
      resHeaders.add("Content-Type", "text/plain; charset=UTF-8");

      if (origin != null) {
        // https://developer.mozilla.org/En/HTTP_Access_Control
View Full Code Here


        try {
            if (isMappingIndexRequest(request)) {
                // lets return the JSON of all the results
                String json = mappingRulesToJson(mappingRules);
                HttpServerResponse response = request.response();
                response.headers().set("ContentType", "application/json");
                response.end(json);
                response.setStatusCode(200);
            } else {
                MappedServices mappedServices = null;
                URL clientURL = null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.