Version: v0.8.1 - Beta.  We welcome contributors & feedback.

Request.isAjax

Request.isAjax() -> boolean

Description

Return true if the current request was made as an XmlHttpRequest (i.e. client-side AJAX).

// Ex: Handling a $.ajax() call from jQuery.
if Request.isAjax() {
    Output.sendJson({ status: 'ok' })
}

See Also