Trait/Object

play.filters.cors

CORSActionBuilder

Related Docs: object CORSActionBuilder | package cors

Permalink

trait CORSActionBuilder extends ActionBuilder[Request] with AbstractCORSPolicy

An play.api.mvc.ActionBuilder that implements Cross-Origin Resource Sharing (CORS)

Source
CORSActionBuilder.scala
See also

CORS specification

CORSFilter

Linear Supertypes
AbstractCORSPolicy, ActionBuilder[Request], ActionFunction[Request, Request], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CORSActionBuilder
  2. AbstractCORSPolicy
  3. ActionBuilder
  4. ActionFunction
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def corsConfig: CORSConfig

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractCORSPolicy
  2. abstract def errorHandler: HttpErrorHandler

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractCORSPolicy

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def andThen[Q[_]](other: ActionFunction[Request, Q]): ActionBuilder[Q]

    Permalink

    Compose this ActionFunction with another, with this one applied first.

    Compose this ActionFunction with another, with this one applied first.

    other

    ActionFunction with which to compose

    returns

    The new ActionFunction

    Definition Classes
    ActionBuilderActionFunction
  5. final def apply(block: ⇒ Result): Action[AnyContent]

    Permalink

    Constructs an Action with default content, and no request parameter.

    Constructs an Action with default content, and no request parameter.

    For example:

    val hello = Action {
      Ok("Hello!")
    }
    block

    the action code

    returns

    an action

    Definition Classes
    ActionBuilder
  6. final def apply(block: (Request[AnyContent]) ⇒ Result): Action[AnyContent]

    Permalink

    Constructs an Action with default content.

    Constructs an Action with default content.

    For example:

    val echo = Action { request =>
      Ok("Got request [" + request + "]")
    }
    block

    the action code

    returns

    an action

    Definition Classes
    ActionBuilder
  7. final def apply[A](bodyParser: BodyParser[A])(block: (Request[A]) ⇒ Result): Action[A]

    Permalink

    Constructs an Action.

    Constructs an Action.

    For example:

    val echo = Action(parse.anyContent) { request =>
      Ok("Got request [" + request + "]")
    }
    A

    the type of the request body

    bodyParser

    the BodyParser to use to parse the request body

    block

    the action code

    returns

    an action

    Definition Classes
    ActionBuilder
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. final def async[A](bodyParser: BodyParser[A])(block: (Request[A]) ⇒ Future[Result]): Action[A]

    Permalink

    Constructs an Action that returns a future of a result, with default content.

    Constructs an Action that returns a future of a result, with default content.

    For example:

    val hello = Action.async { request =>
      WS.url(request.getQueryString("url").get).get().map { r =>
        if (r.status == 200) Ok("The website is up") else NotFound("The website is down")
      }
    }
    block

    the action code

    returns

    an action

    Definition Classes
    ActionBuilder
  10. final def async(block: (Request[AnyContent]) ⇒ Future[Result]): Action[AnyContent]

    Permalink

    Constructs an Action that returns a future of a result, with default content.

    Constructs an Action that returns a future of a result, with default content.

    For example:

    val hello = Action.async { request =>
      WS.url(request.getQueryString("url").get).get().map { r =>
        if (r.status == 200) Ok("The website is up") else NotFound("The website is down")
      }
    }
    block

    the action code

    returns

    an action

    Definition Classes
    ActionBuilder
  11. final def async(block: ⇒ Future[Result]): Action[AnyContent]

    Permalink

    Constructs an Action that returns a future of a result, with default content, and no request parameter.

    Constructs an Action that returns a future of a result, with default content, and no request parameter.

    For example:

    val hello = Action.async {
      WS.url("http://www.playframework.com").get().map { r =>
        if (r.status == 200) Ok("The website is up") else NotFound("The website is down")
      }
    }
    block

    the action code

    returns

    an action

    Definition Classes
    ActionBuilder
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def compose(other: ActionBuilder[Request]): ActionBuilder[Request]

    Permalink
    Definition Classes
    ActionFunction
  14. def compose[Q[_]](other: ActionFunction[Q, Request]): ActionFunction[Q, Request]

    Permalink

    Compose another ActionFunction with this one, with this one applied last.

    Compose another ActionFunction with this one, with this one applied last.

    other

    ActionFunction with which to compose

    returns

    The new ActionFunction

    Definition Classes
    ActionFunction
  15. def composeAction[A](action: Action[A]): Action[A]

    Permalink

    Compose the action with other actions.

    Compose the action with other actions. This allows mixing in of various actions together.

    action

    The action to compose

    returns

    The composed action

    Attributes
    protected
    Definition Classes
    ActionBuilder
  16. def composeParser[A](bodyParser: BodyParser[A]): BodyParser[A]

    Permalink

    Compose the parser.

    Compose the parser. This allows the action builder to potentially intercept requests before they are parsed.

    bodyParser

    The body parser to compose

    returns

    The composed body parser

    Attributes
    protected
    Definition Classes
    ActionBuilder
  17. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  19. def executionContext: ExecutionContext

    Permalink

    Get the execution context to run the request in.

    Get the execution context to run the request in. Override this if you want a custom execution context

    returns

    The execution context

    Attributes
    protected
    Definition Classes
    ActionFunction
  20. def filterRequest(next: (RequestHeader) ⇒ Future[Result], request: RequestHeader): Future[Result]

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractCORSPolicy
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. def invokeBlock[A](request: Request[A], block: (Request[A]) ⇒ Future[Result]): Future[Result]

    Permalink

    Invoke the block.

    Invoke the block. This is the main method that an ActionBuilder has to implement, at this stage it can wrap it in any other actions, modify the request object or potentially use a different class to represent the request.

    request

    The request

    block

    The block of code to invoke

    returns

    A future of the result

    Definition Classes
    CORSActionBuilderActionFunction
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. val logger: api.Logger

    Permalink
    Attributes
    protected
    Definition Classes
    CORSActionBuilder → AbstractCORSPolicy
  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AbstractCORSPolicy

Inherited from ActionBuilder[Request]

Inherited from ActionFunction[Request, Request]

Inherited from AnyRef

Inherited from Any

Ungrouped