RequestTarget

play.api.mvc.request.RequestTarget
See theRequestTarget companion object

The target of a request, as defined in RFC 7230 section 5.3, i.e. the URI or path that has been requested by the client.

Attributes

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

Members list

Value members

Abstract methods

def path: String

The path that was requested. If a URI was provided this will be its path component.

The path that was requested. If a URI was provided this will be its path component.

Attributes

The query component of the URI parsed into a map of parameters and values.

The query component of the URI parsed into a map of parameters and values.

Attributes

def uri: URI

The parsed URI of the request. In rare circumstances, the URI may be unparseable and accessing this value will throw an exception.

The parsed URI of the request. In rare circumstances, the URI may be unparseable and accessing this value will throw an exception.

Attributes

The complete request URI, containing both path and query string. The URI is what was on the status line after the request method. E.g. in "GET /foo/bar?q=s HTTP/1.1" the URI should be /foo/bar?q=s. It could be absolute, some clients send absolute URLs, especially proxies, e.g. http://www.example.org/foo/bar?q=s.

The complete request URI, containing both path and query string. The URI is what was on the status line after the request method. E.g. in "GET /foo/bar?q=s HTTP/1.1" the URI should be /foo/bar?q=s. It could be absolute, some clients send absolute URLs, especially proxies, e.g. http://www.example.org/foo/bar?q=s.

Attributes

Concrete methods

Helper method to access a query parameter.

Helper method to access a query parameter.

Attributes

Returns

The query parameter's value if the parameter is present and there is only one value. If the parameter is absent or there is more than one value for that parameter then None is returned.

The query component of the URI as an unparsed string.

The query component of the URI as an unparsed string.

Attributes

def withPath(newPath: String): RequestTarget

Return a copy of this object with a new path.

Return a copy of this object with a new path.

Attributes

def withQueryString(newQueryString: Map[String, Seq[String]]): RequestTarget

Return a copy of this object with a new query string.

Return a copy of this object with a new query string.

Attributes

def withUri(newUri: URI): RequestTarget

Return a copy of this object with a new URI.

Return a copy of this object with a new URI.

Attributes

def withUriString(newUriString: String): RequestTarget

Return a copy of this object with a new URI.

Return a copy of this object with a new URI.

Attributes