class Req extends HasParams with UserAgentCalculator
Contains request information
- Alphabetic
- By Inheritance
- Req
- UserAgentCalculator
- HasParams
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Req(_path: ParsePath, _contextPath: String, _requestType: RequestType, _contentType: Box[String], _request: HTTPRequest, _nanoStart: Long, _nanoEnd: Long, _paramCalculator: () ⇒ ParamCalcInfo, _addlParams: Map[String, String])
- new Req(path: ParsePath, contextPath: String, requestType: RequestType, contentType: Box[String], request: HTTPRequest, nanoStart: Long, nanoEnd: Long, _stateless_?: Boolean, paramCalculator: () ⇒ ParamCalcInfo, addlParams: Map[String, String])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
_params: Map[String, List[String]]
the raw parameters, use params
-
lazy val
accepts: Box[String]
the accept header
-
lazy val
acceptsJavaScript_?: Boolean
Returns true if the request accepts JavaScript
-
lazy val
acceptsJson_?: Boolean
Returns true if the request accepts JSON
-
lazy val
acceptsStarStar: Boolean
Is the Accepts Header * / *
-
lazy val
acceptsXml_?: Boolean
Returns true if the request accepts XML
-
def
ajax_?: Boolean
Returns true if the X-Requested-With header is set to XMLHttpRequest.
Returns true if the X-Requested-With header is set to XMLHttpRequest.
Most ajax frameworks, including jQuery and Prototype, set this header when doing any ajax request.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
body: Box[Array[Byte]]
The POST or PUT body.
The POST or PUT body. This will be empty if the content type is application/x-www-form-urlencoded or a multipart mime. It will also be empty if rawInputStream is accessed
- lazy val buildMenu: CompleteMenu
-
lazy val
chromeVersion: Box[Double]
- Definition Classes
- UserAgentCalculator
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- val contentType: Box[String]
- val contextPath: String
- lazy val cookies: List[HTTPCookie]
- def createNotFound(f: Failure): LiftResponse
- def createNotFound: LiftResponse
-
def
destroyServletSession(): Unit
Make the servlet session go away
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
lazy val
firefoxVersion: Box[Double]
- Definition Classes
- UserAgentCalculator
-
lazy val
forcedBodyAsJson: Box[JValue]
Forcibly tries to parse the request body as JSON.
Forcibly tries to parse the request body as JSON. Does not perform any content type checks, unlike the json method.
-
lazy val
forcedBodyAsXml: Box[Elem]
Forcibly tries to parse the request body as XML.
Forcibly tries to parse the request body as XML. Does not perform any content type checks, unlike the xml method.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- val get_?: Boolean
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- def header(name: String): Box[String]
- def headers(name: String): List[String]
- lazy val headers: List[(String, String)]
-
lazy val
hostAndPath: String
The host and path of the request up to and including the context path.
The host and path of the request up to and including the context path. This does not include the template path or query string.
-
lazy val
hostName: String
The hostname to which the request was sent.
The hostname to which the request was sent. This is taken from the "Host" HTTP header, or if that does not exist, the DNS name or IP address of the server.
- val id: String
-
lazy val
ieIE10: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
ieVersion: Box[Int]
- Definition Classes
- UserAgentCalculator
-
lazy val
ifModifiedSince: Box[Date]
Parse the if-modified-since header and return the milliseconds since epoch of the parsed date.
-
def
isChrome: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isChrome2: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isChrome3: Boolean
- Definition Classes
- UserAgentCalculator
-
def
isChrome3_+: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isChrome4: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isChrome5: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isChrome6: Boolean
- Definition Classes
- UserAgentCalculator
-
def
isFirefox: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isFirefox2: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isFirefox3: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isFirefox35: Boolean
- Definition Classes
- UserAgentCalculator
-
def
isFirefox35_+: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isFirefox36: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isFirefox40: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isIE: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isIE11: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isIE6: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isIE7: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isIE8: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isIE9: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isIPad: Boolean
Is the Req coming from an iPad
Is the Req coming from an iPad
- Definition Classes
- UserAgentCalculator
-
lazy val
isIPhone: Boolean
Is the Req coming from an iPhone
Is the Req coming from an iPhone
- Definition Classes
- UserAgentCalculator
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isOpera: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isOpera9: Boolean
- Definition Classes
- UserAgentCalculator
-
def
isSafari: Boolean
- Definition Classes
- UserAgentCalculator
-
def
isSafari2: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isSafari3: Boolean
- Definition Classes
- UserAgentCalculator
-
def
isSafari3_+: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isSafari4: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
isSafari5: Boolean
- Definition Classes
- UserAgentCalculator
-
lazy val
json: Box[JValue]
The JValue representation of this Req's body, if the body is JSON-parsable AND the content-type of the request is JSON.
The JValue representation of this Req's body, if the body is JSON-parsable AND the content-type of the request is JSON. Returns a Failure if the request is not considered a JSON request (see json_?), or if there was an error parsing the JSON.
If you want to forcibly evaluate the request body as JSON, ignoring content type, see
forcedBodyAsJson
. -
def
json_?: Boolean
Returns true if the content-type is text/json or application/json
-
lazy val
location: Box[Loc[_]]
The SiteMap Loc associated with this Req
- val nanoEnd: Long
- val nanoStart: Long
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def normalizeHtml(in: NodeSeq): NodeSeq
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- val options_?: Boolean
- def param(n: String): Box[String]
-
def
paramNames: List[String]
Get the name of the params
- lazy val params: Map[String, List[String]]
- def path(n: Int): String
- val path: ParsePath
- def pathParam(n: Int): String
- val post_?: Boolean
- val put_?: Boolean
-
def
rawInputStream: Box[InputStream]
The raw input stream of a POST or PUT that is not application/x-www-form-urlencoded or a multipart mime and if this method is called before the body method.
The raw input stream of a POST or PUT that is not application/x-www-form-urlencoded or a multipart mime and if this method is called before the body method. Remember to close the stream when done.
-
def
remoteAddr: String
The IP address of the request
- val request: HTTPRequest
- val requestType: RequestType
-
lazy val
safariVersion: Box[Int]
- Definition Classes
- UserAgentCalculator
- val section: String
-
def
sessionId: Box[String]
Get the session ID if there is one without creating on
-
def
snapshot: Req
A snapshot of the request that can be passed off the current thread
A snapshot of the request that can be passed off the current thread
- returns
a copy of the Req
-
lazy val
standardRequest_?: Boolean
A request that is neither Ajax or Comet
-
lazy val
stateless_?: Boolean
Should the request be treated as stateless (no session created for it)?
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def testFor304(lastModified: Long, headers: (String, String)*): Box[LiftResponse]
- def testIfModifiedSince(when: Long): Boolean
-
def
testLocation: Either[Boolean, Box[LiftResponse]]
Test the current SiteMap Loc for access control to insure that this Req is allowed to access the page
-
def
toString(): String
- Definition Classes
- Req → AnyRef → Any
- def updateWithContextPath(uri: String): String
-
def
uploadedFiles: List[FileParamHolder]
The uploaded files
- lazy val uri: String
-
lazy val
userAgent: Box[String]
The user agent of the browser that sent the request
The user agent of the browser that sent the request
- Definition Classes
- Req → UserAgentCalculator
- val view: String
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
lazy val
weightedAccept: List[ContentType]
What is the content type in order of preference by the requester calculated via the Accept header
-
def
withNewPath(newPath: ParsePath): Req
Build a new Req, the same except with a different path.
Build a new Req, the same except with a different path. Useful for creating Reqs with sub-paths.
-
lazy val
xml: Box[Elem]
The Elem representation of this Req's body, if the body is XML-parsable AND the content-type of the request is XML.
The Elem representation of this Req's body, if the body is XML-parsable AND the content-type of the request is XML. Returns a Failure if the request is not considered a XML request (see xml_?), or if there was an error parsing the XML.
If you want to forcibly evaluate the request body as XML, ignoring content type, see
forcedBodyAsXml
. -
def
xml_?: Boolean
Returns true if the content-type is text/xml or application/xml
Deprecated Value Members
-
def
fixHtml(in: NodeSeq): NodeSeq
- Annotations
- @deprecated
- Deprecated
(Since version 3.0.0) Use normalizeHtml instead.