Skip to content
Myr

Removed req.isXMLHttpRequest

Before adoption: this commit came in with the history the project adopted, so no landing records it.

let me know if you actually use this :)

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 801a179 · Browse files · 1 file+4 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−8 removed

  • other:+4 added−8 removed

1 file+4 added−8 removed

modified:lib/request.js+4 added-8 removed
358 unmodified lines
359req.__defineGetter__('stale', function(){360 return connect.utils.modified(this, this.res);361});362363// Callback for isXMLHttpRequest / xhr364365function isxhr() {366 return this.header('X-Requested-With', '').toLowerCase() === 'xmlhttprequest';367}368363/**364 * Check if the request was an _XMLHttpRequest_.365 *366 * @return {Boolean}367 * @api public368 */369376req.__defineGetter__('isXMLHttpRequest', isxhr);377req.__defineGetter__('xhr', isxhr);370req.__defineGetter__('xhr', function(){371 return this.header('X-Requested-With', '')372 .toLowerCase() == 'xmlhttprequest';373});