Package play.mvc.Http

Examples of play.mvc.Http.Request.method()


        try {
          beforeActionInvocation(ctx, actionMethod);

          SimpleResult result = null;
          Request req = ctx.request();
          String method = req.method();
          int duration = 0;
          String key = null;
          Cached cachAnno = actionMethod.getAnnotation(Cached.class);
          // Check the cache (only for GET or HEAD)
          if ((method.equals("GET") || method.equals("HEAD")) && cachAnno != null) {
View Full Code Here


 
  private ALogger accessLogger = Logger.of("access");
 
  public F.Promise<Result> call(Http.Context ctx) throws Throwable {
    final Request request = ctx.request();
    accessLogger.info("method=" + request.method() + " uri=" + request.uri() + " remote-address=" + request.remoteAddress());
   
    return delegate.call(ctx);
  }
}
//#logging-pattern-mix
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.