case class Call(method: String, url: String, fragment: String = null) extends mvc.Call with Product with Serializable
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.
- method
the request HTTP method
- url
the request URL
- Source
- Call.scala
- Alphabetic
- By Inheritance
- Call
- Serializable
- Product
- Equals
- Call
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Call(method: String, url: String, fragment: String = null)
- method
the request HTTP method
- url
the request URL
Value Members
- def absoluteURL(secure: Boolean)(implicit request: RequestHeader): String
Transform this call to an absolute URL.
- 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
- def absoluteURL(arg0: Boolean, arg1: String): String
- Definition Classes
- Call
- def absoluteURL(arg0: mvc.Http.Request, arg1: Boolean): String
- Definition Classes
- Call
- def absoluteURL(arg0: mvc.Http.Request): String
- Definition Classes
- Call
- def canonical(): String
- Definition Classes
- Call
- val fragment: String
- Definition Classes
- Call → Call
- val method: String
- Definition Classes
- Call → Call
- def path(): String
- Definition Classes
- Call
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- 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"
- def relativeTo(arg0: String): String
- Definition Classes
- Call
- def relativeTo(arg0: mvc.Http.RequestHeader): String
- Definition Classes
- Call
- def toString(): String
- Definition Classes
- Call → AnyRef → Any
- def unique(): Call
- Definition Classes
- Call → Call
- val url: String
- Definition Classes
- Call → Call
- def webSocketURL(secure: Boolean)(implicit request: RequestHeader): String
Transform this call to an WebSocket URL.
- 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
- def webSocketURL(arg0: Boolean, arg1: String): String
- Definition Classes
- Call
- def webSocketURL(arg0: mvc.Http.Request, arg1: Boolean): String
- Definition Classes
- Call
- def webSocketURL(arg0: mvc.Http.Request): String
- Definition Classes
- Call
- def withFragment(fragment: String): Call
- Definition Classes
- Call → Call