Permalink
Browse files

Removed req.isXMLHttpRequest

let me know if you actually use this :)
  • Loading branch information...
tj committed Nov 9, 2011
1 parent 801a179 commit af46df7eaea3e5687e483d0aeceb250d14f10aa3
Showing with 4 additions and 8 deletions.
  1. +4 −8 lib/request.js
View
@@ -360,18 +360,14 @@ req.__defineGetter__('stale', function(){
return connect.utils.modified(this, this.res);
});
-// Callback for isXMLHttpRequest / xhr
-
-function isxhr() {
- return this.header('X-Requested-With', '').toLowerCase() === 'xmlhttprequest';
-}
-
/**
* Check if the request was an _XMLHttpRequest_.
*
* @return {Boolean}
* @api public
*/
-req.__defineGetter__('isXMLHttpRequest', isxhr);
-req.__defineGetter__('xhr', isxhr);
+req.__defineGetter__('xhr', function(){
+ return this.header('X-Requested-With', '')
+ .toLowerCase() == 'xmlhttprequest';
+});

0 comments on commit af46df7

Please sign in to comment.