Filter

play.api.mvc.Filter
See theFilter companion object
trait Filter extends EssentialFilter

Implement this interface if you want to add a Filter to your application

object AccessLog extends Filter {
 override def apply(next: RequestHeader => Future[Result])(request: RequestHeader): Future[Result] = {
   val result = next(request)
   result.map { r => play.Logger.info(request + "\n\t => " + r); r }
 }
}

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Abstract methods

Apply the filter, given the request header and a function to call the next operation.

Apply the filter, given the request header and a function to call the next operation.

Value parameters

f

A function to call the next operation. Call this to continue normally with the current request. You do not need to call this function if you want to generate a result in a different way.

rh

The RequestHeader.

Attributes

Concrete methods

Inherited methods

def asJava: EssentialFilter

Attributes

Inherited from:
EssentialFilter

Implicits

Implicits

implicit def mat: Materializer