 package ibgroup.utils;
 
 import io.vertx.core.http.HttpServerRequest;
 import io.vertx.core.json.JsonObject;
 import io.vertx.ext.web.RoutingContext;
 
 
 public class HttpResponse
 {
   public static final int STATUS_ACCESS_DENIED = 401;
   public static final int STATUS_NOT_FOUND = 404;
   
   public static void sendAccessDenied(HttpServerRequest clientReq) {
/* 14 */     clientReq.response().setChunked(false);
/* 15 */     clientReq.response().setStatusCode(401);
/* 16 */     clientReq.response().end();
   }
   
   public static void sendNotFound(HttpServerRequest clientReq, String uri) {
/* 20 */     String res = "Unknown path " + uri;
/* 21 */     sendResponse(clientReq, res);
   }
   
   public static void sendResponse(HttpServerRequest clientReq, String res) {
/* 25 */     clientReq.response().setChunked(false);
/* 26 */     clientReq.response().putHeader("Content-Length", "" + res.length());
/* 27 */     clientReq.response().setStatusCode(404);
/* 28 */     clientReq.response().write(res).end();
   }
   
   public static void sendResponse(RoutingContext ctx, JsonObject res) {
/* 32 */     ctx.response()
/* 33 */       .setStatusCode(200)
/* 34 */       .putHeader("Content-Type", "application/json; charset=utf-8")
/* 35 */       .end(res.toBuffer());
   }
 }


/* Location:              C:\Users\iuzeri\AppData\Local\Temp\ibrk_cpwa_gateway\dist\ibgroup.web.core.iblink.router.clientportal.gw.jar!\ibgroup\web\core\clientportal\g\\utils\HttpResponse.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */