Jaxer.Request : Object
Return to: Jaxer Framework index

An instance of this object has the lifecycle of the current request and contains information about it.

Platform Support

Jaxer Server FrameworkJaxer Client Framework
1.0no

Classes

Jaxer.Request.ACTIONS
Jaxer.Request.FileInfo

Constructors

ConstructorActionJaxer Server FrameworkJaxer Client Framework
Jaxer.Request Constructor(Object evt) : Jaxer.Request
An instance of this object has the lifecycle of the current request and contains information about it. This constructor is typically never invoked by the user. During the processing of the page Jaxer will create an instance of this object named Jaxer.request, this instance should be used to introspect the request details.
Show Details1.0no

Jaxer.Request(Object evt) : Jaxer.Request

An instance of this object has the lifecycle of the current request and contains information about it. This constructor is typically never invoked by the user. During the processing of the page Jaxer will create an instance of this object named Jaxer.request, this instance should be used to introspect the request details.

Parameters
ObjectevtThe core event whose data is used to initialize this Request object instance

Returns
Jaxer.RequestReturns an instance of Request.

Properties

PropertyActionJaxer Server FrameworkJaxer Client Framework
appKey : String
A string used to identify what application the current request is asking for

(Advanced)
No Details 1.0no
Visibility
advanced
pageKey : String
A string used to identify what page in the application the current request is asking for

(Advanced)
No Details 1.0no
Visibility
advanced
action : String
The type of HTTP request this is: usually "GET" or "POST". Guaranteed to be all upper-case, and the same as the action property.
Show Details1.0no
See Also

Jaxer.Request.ACTIONS

app : Jaxer.App
The Jaxer.App object constructed by searching in configApps.js for an object that matches the current request's parsedUrl and using it to set application-specific settings (such as the database connection to use) during this request
No Details 1.0no
body : Object
The body of the HTTP request, which usually contains the data during a POST request, and is often of type 'application/x-www-form-urlencoded' (i.e. "name1=value1&name2=value2&..."). The type of data returned by this property depends on the Content-Type of the request and on Config.REQUEST_BODY_AS.
No Details 1.0no
bodyAsByteArray : Number[]
The body of this request (usually the payload of a POST request) as a byte array, which may be empty. For example, a GET request always has an empty body.
No Details 1.0no
bodyAsStream : Object
The body of this request (usually the payload of a POST request) as a stream, which may be empty. For example, a GET request always has an empty body.
No Details 1.0no
bodyAsString : String
The body of this request (usually the payload of a POST request) as a string, which may be empty. For example, a GET request always has an empty body. NOTE that when the contentType is 'multipart/form-data' this will always be '', indicating that the body of the request has been pre-processed by Jaxer and is instead available via the files and data properties.
No Details 1.0no
contentLength : Number
The Content-Length in bytes of the body of this request. NOTE that when the contentType is 'multipart/form-data' this will always return 0, indicating that the body of the request has been pre-processed by Jaxer and is instead available via the files and data properties.
No Details 1.0no
contentType : String
The Content-Type (i.e. mime-type) of the body of this request, which describes the body of this request. Usually this will be 'application/x-www-form-urlencoded' or 'multipart/form-data'.
No Details 1.0no
current : Jaxer.Util.Url.ParsedUrl
Holds the parsed URL information of the current page, which on a callback is different from the original page.
Show Details1.0no
See Also

Jaxer.Request.parsedUrl

currentFolder : String
The folder (directory) on disk holding the file (pageFile) being served in this request. This is '' if there is no pageFile information, e.g. if the web server is on a different filesystem than Jaxer.
No Details 1.0no
data : Object
An object holding the name=value pairs of the current request's body (assumed to be of type application/x-www-form-urlencoded) as properties
No Details 1.0no
documentRoot : String
The location on disk of the top folder from which all web pages are served by the web server, as an absolute URL (without the preceding file://). This is usually only meaningful if the web server is on the same filesystem as Jaxer.
No Details 1.0no
env : Object
A collection of the environment variables received from the web server for this request, as properties on this simple JavaScript object. If multiple variables had the same name, their values are given as an array.
No Details 1.0no
files : Array
An array of Jaxer.Request.FileInfo objects describing any uploaded files. You must call save(newFileName) on each of these if you'd like to save them, otherwise they will be purged at the end of the request.
Show Details1.0no
See Also

Jaxer.FileInfo.prototype.save

headers : Object
A collection of the HTTP headers received from the web server for this request, as properties on this simple JavaScript object. If multiple headers had the same name, their values are given as an array.
No Details 1.0no
isCallback : Boolean
True if Jaxer is handling the current request as a callback (RPC). This requires Jaxer to be the handler of the request and the path of the request to start with Config.CALLBACK_URI (which must not be blank)
No Details 1.0no
isHandler : Boolean
True if Jaxer is the main "handler" for the current request, rather than is filtering a page served by a different handler.
No Details 1.0no
isHTTPS : Boolean
Whether the current page is being requested and served over the HTTPS protocol.
No Details 1.0no
method : String
The type of HTTP request this is: usually "GET" or "POST". Guaranteed to be all upper-case, and the same as the action property.
Show Details1.0no
See Also

Jaxer.Request.ACTIONS

pageFile : String
The location on disk of the current page's file, served by the web server, as an absolute URL (without the preceding file://). This is usually only meaningful if the web server is on the same filesystem as Jaxer.
No Details 1.0no
paramIsBody : Boolean
True if the entire body of the request is to be considered as the single data parameter of this request.
No Details 1.0no
parsedUrl : Jaxer.Util.Url.ParsedUrl
Holds the parsed URL information of the true page: this is the current URL for a regularly-served page, but for a callback this is the URL of the original page (now the Referer) that requested the callback.
No Details 1.0no
protocol : String
The protocol declared in the HTTP request, e.g. "HTTP/1.1".
No Details 1.0no
queryString : String
The query part of the current request's URL, after the "?". This is also available as Jaxer.request.parsedUrl.query and is parsed into the JavaScript object Jaxer.request.parsedUrl.queryParts.
No Details 1.0no
referer : String
The value of the Referer HTTP header for this request, which should indicate the complete URL of the page that made this request. If this is a callback, the referer is taken from the "callingPage" parameter of the request, only using the Referer header if for some reason "callingPage" is not available.
No Details 1.0no
remoteAddr : String
The Internet Protocol (IP) address of the client (browser) that sent the request.
No Details 1.0no
remoteHost : String
The hostname of the client (browser) that sent the request, or the IP address of the client if the hostname cannot be determined.
No Details 1.0no
remoteUser : String
If the browser making the request submitted HTTP authentication credentials, this is the username submitted. Otherwise it is the empty string.
No Details 1.0no
uri : String
The URL (and URI) of the current request.
No Details 1.0no
userAgent : String
The string used to identify the user agent of the client making the request.
No Details 1.0no
static ACTIONS : Object
An enumeration of constants for various standard HTTP methods or actions
No Details 1.0no

Functions

MethodActionJaxer Server FrameworkJaxer Client Framework
compileScript(String contents, [Object global,] [String effectiveUrl]) : String
Low-level method to compile a string of JavaScript source code in a given global context and with a certain effectiveUrl as its "file".
Show Details1.0no

Parameters
StringcontentsThe string of script code to evaluate
Objectglobal(optional)An optional global context (usually a window object) in which to evaluate it
StringeffectiveUrl(optional)An optional parameter to indicate (e.g. in error messages) the effective URL from which this code originates.

Returns
StringThe compiled code

See Also

Jaxer.Includer.compile

evaluateCompiledScript(String compiledContents, [Object global]) : Object
Low-level method to evaluate a string of compiled JavaScript code in a given global context.
Show Details1.0no

Parameters
StringcompiledContentsThe bytecode string of script code to evaluate
Objectglobal(optional)An optional global context (usually a window object) in which to evaluate it

Returns
ObjectThe result of the evaluation, if any

See Also

Jaxer.Includer.evalCompiledOn

evaluateScript(String contents, [Object global,] [String effectiveUrl]) : Object
Low-level method to evaluate a string of JavaScript source code in a given global context and with a certain effectiveUrl as its "file".
Show Details1.0no

Parameters
StringcontentsThe string of script code to evaluate
Objectglobal(optional)An optional global context (usually a window object) in which to evaluate it
StringeffectiveUrl(optional)An optional parameter to indicate (e.g. in error messages) the effective URL from which this code originates.

Returns
ObjectThe result of the evaluation, if any

See Also

Jaxer.Includer.evalOn

aptana_docs