Call

play.api.mvc.Call
case class Call(method: String, url: String, fragment: String) extends Call

Defines a Call, which describes an HTTP request and can be used to create links or fill redirect data.

These values are usually generated by the reverse router.

Value parameters

method

the request HTTP method

url

the request URL

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Call
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def absoluteURL()(implicit request: RequestHeader): String

Transform this call to an absolute URL.

Transform this call to an absolute URL.

import play.api.mvc.{ Call, RequestHeader }

implicit val req: RequestHeader = myRequest
val url: String = Call("GET", "/url").absoluteURL()
// == "http://$host/url", or "https://$host/url" if secure

Attributes

def absoluteURL(secure: Boolean)(implicit request: RequestHeader): String

Transform this call to an absolute URL.

Transform this call to an absolute URL.

Attributes

def relative(implicit request: RequestHeader): String

Transform this call to a URL relative to the current request's path.

Transform this call to a URL relative to the current request's path.

import play.api.mvc.{ Call, RequestHeader }

implicit val req: RequestHeader = myRequest
// If current req.path == "/playframework"
val url: String = Call("GET", "/url").relative
// == "../url"

Attributes

override def unique(): Call

Attributes

Definition Classes
Call
def webSocketURL()(implicit request: RequestHeader): String

Transform this call to an WebSocket URL.

Transform this call to an WebSocket URL.

import play.api.mvc.{ Call, RequestHeader }

implicit val req: RequestHeader = myRequest
val url: String = Call("GET", "/url").webSocketURL()
// == "ws://$host/url", or "wss://$host/url" if secure

Attributes

def webSocketURL(secure: Boolean)(implicit request: RequestHeader): String

Transform this call to an WebSocket URL.

Transform this call to an WebSocket URL.

Attributes

override def withFragment(fragment: String): Call

Attributes

Definition Classes
Call

Inherited methods

def absoluteURL(x$0: Boolean, x$1: String): String

Attributes

Inherited from:
Call
def absoluteURL(x$0: Request, x$1: Boolean): String

Attributes

Inherited from:
Call
def absoluteURL(x$0: Request): String

Attributes

Inherited from:
Call
def canonical(): String

Attributes

Inherited from:
Call
def path(): String

Attributes

Inherited from:
Call

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def relativeTo(x$0: String): String

Attributes

Inherited from:
Call
def relativeTo(x$0: RequestHeader): String

Attributes

Inherited from:
Call
def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Inherited from:
Call
def webSocketURL(x$0: Boolean, x$1: String): String

Attributes

Inherited from:
Call
def webSocketURL(x$0: Request, x$1: Boolean): String

Attributes

Inherited from:
Call
def webSocketURL(x$0: Request): String

Attributes

Inherited from:
Call