More apps
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 97037a8 · Browse files · 7 files·+240 added−219 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
7 files+240 added−219 removed
- other:+240 added−219 removed
Provenance
- Commit
dcc530a- Tree
9048841- Author
Tj Holowaychuk <tj@vision-media.ca>- Committer
Tj Holowaychuk <tj@vision-media.ca>- Parent
97037a8
7 files changed+240 added−219 removed
added:docs/images/apps/e-resistable.pngbinary
A binary file, added.
added:docs/images/apps/opowerjobs.pngbinary
A binary file, added.
added:docs/images/apps/toptwittertrends.pngbinary
A binary file, added.
modified:docs/api.html+219 added-219 removed
162 unmodified lines163 <span class="variable">require</span>(<span class="string">'./response'</span>);164 <span class="variable">require</span>(<span class="string">'./request'</span>);165 </code></pre>166 </td>167+</tr><tr class="filename"><td><h2 id="lib/express/request.js"><a href="#">request</a></h2></td><td>lib/express/request.js</td></tr><tr class="code">168+<td class="docs">169+<p>Module dependencies.170+ </p>171+</td>172+<td class="code">173+<pre><code><span class="keyword">var</span> <span class="variable">http</span> = <span class="variable">require</span>(<span class="string">'http'</span>)174+ , <span class="variable">utils</span> = <span class="variable">require</span>(<span class="string">'./utils'</span>)175+ , <span class="variable">mime</span> = <span class="variable">require</span>(<span class="string">'connect/utils'</span>).<span class="variable">mime</span>;</code></pre>176+</td>177+</tr>178+<tr class="code">179+<td class="docs">180+<p>Default flash formatters.</p>181+182+<ul><li><p><strong>type</strong>: <em>Object</em></p></li></ul>183+</td>184+<td class="code">185+<pre><code><span class="keyword">var</span> <span class="variable">flashFormatters</span> = <span class="variable">exports</span>.<span class="variable">flashFormatters</span> = {186+ <span class="variable">s</span>: <span class="keyword">function</span>(<span class="variable">val</span>){187+ <span class="keyword">return</span> <span class="class">String</span>(<span class="variable">val</span>);188+ }189+};</code></pre>190+</td>191+</tr>192+<tr class="code">193+<td class="docs">194+<p>Return request header or optional default.</p>195+196+<h2>Examples</h2>197+198+<pre><code>req.header('Content-Type');199+// => "text/plain"200+201+req.header('content-type');202+// => "text/plain"203+204+req.header('Accept');205+// => undefined206+207+req.header('Accept', 'text/html');208+// => "text/html"</code></pre>209+210+<h2></h2>211+212+<ul><li><p><strong>param</strong>: <em>String</em> name</p></li><li><p><strong>param</strong>: <em>String</em> defaultValue</p></li><li><p><strong>return</strong>: <em>String</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>213+</td>214+<td class="code">215+<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">header</span> = <span class="keyword">function</span>(<span class="variable">name</span>, <span class="variable">defaultValue</span>){216+ <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">headers</span>[<span class="variable">name</span>.<span class="variable">toLowerCase</span>()] || <span class="variable">defaultValue</span>;217+};</code></pre>218+</td>219+</tr>220+<tr class="code">221+<td class="docs">222+<p>Check if the <em>Accept</em> header is present, and includes the given <code>type</code>.</p>223+224+<p>When the <em>Accept</em> header is not present <code>true</code> is returned. Otherwise225+the given <code>type</code> is matched by an exact match, and then subtypes. You226+may pass the subtype such as "html" which is then converted internally227+to "text/html" using the mime lookup table.</p>228+229+<h2>Examples</h2>230+231+<pre><code>// Accept: text/html232+req.accepts('html');233+// => true234+235+// Accept: text/*; application/json236+req.accepts('html');237+req.accepts('text/html');238+req.accepts('text/plain');239+req.accepts('application/json');240+// => true241+242+req.accepts('image/png');243+req.accepts('png');244+// => false</code></pre>245+246+<h2></h2>247+248+<ul><li><p><strong>param</strong>: <em>String</em> type</p></li><li><p><strong>return</strong>: <em>Boolean</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>249+</td>250+<td class="code">251+<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">accepts</span> = <span class="keyword">function</span>(<span class="variable">type</span>){252+ <span class="keyword">var</span> <span class="variable">accept</span> = <span class="this">this</span>.<span class="variable">header</span>(<span class="string">'Accept'</span>);253+ <span class="keyword">if</span> (!<span class="variable">accept</span> || <span class="variable">accept</span> === '*</code></pre>254+</td>255+</tr>256+<tr class="code">257+<td class="docs">258+<p>') {259+ return true;260+ } else if (type) {261+ // Allow "html" vs "text/html" etc262+ if (type.indexOf('/') < 0) {263+ type = mime.types['.' + type];264+ }265+ // Check if we have a direct match266+ if (accept.indexOf(type) >= 0) {267+ return true;268+ // Check if we have type/<em>269+ } else {270+ type = type.split('/')[0] + '/</em>';271+ return accept.indexOf(type) >= 0;272+ }273+ } else {274+ return false;275+ }276+};</p>277+278+<p>/**279+Return the value of param <code>name</code> when present.</p>280+281+<ul><li>Checks route placeholders, ex: <em>/user/:id</em></li><li>Checks query string params, ex: ?id=12</li><li>Checks urlencoded body params, ex: id=12</li></ul>282+283+<p>To utilize urlencoded request bodies, <code>req.body</code>284+should be an object. This can be done by using285+the <code>connect.bodyDecoder</code> middleware.</p>286+287+<h2></h2>288+289+<ul><li><p><strong>param</strong>: <em>String</em> name</p></li><li><p><strong>return</strong>: <em>String</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>290+</td>291+<td class="code">292+<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">param</span> = <span class="keyword">function</span>(<span class="variable">name</span>){293+ <span class="comment">// Route params like /user/:id</span>294+ <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">params</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {295+ <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">params</span>[<span class="variable">name</span>]; 296+ }297+ <span class="comment">// Query string params</span>298+ <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">query</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {299+ <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">query</span>[<span class="variable">name</span>]; 300+ }301+ <span class="comment">// Request body params via connect.bodyDecoder</span>302+ <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">body</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="this">this</span>.<span class="variable">body</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {303+ <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">body</span>[<span class="variable">name</span>];304+ }305+};</code></pre>306+</td>307+</tr>308+<tr class="code">309+<td class="docs">310+<p>Queue flash <code>msg</code> of the given <code>type</code>.</p>311+312+<h2>Examples</h2>313+314+<pre><code> req.flash('info', 'email sent');315+ req.flash('error', 'email delivery failed');316+ req.flash('info', 'email re-sent');317+ // => 2318+319+ req.flash('info');320+ // => ['email sent', 'email re-sent']321+322+ req.flash('info');323+ // => []324+325+ req.flash();326+ // => { error: ['email delivery failed'], info: [] }</code></pre>327+328+<h2>Formatting</h2>329+330+<p>Flash notifications also support arbitrary formatting support.331+For example you may pass variable arguments to <code>req.flash()</code>332+and use the %s specifier to be replaced by the associated argument:</p>333+334+<pre><code>req.flash('info', 'email has been sent to %s.', userName);</code></pre>335+336+<p>To add custom formatters use the <code>exports.flashFormatters</code> object.</p>337+338+<h2></h2>339+340+<ul><li><p><strong>param</strong>: <em>String</em> type</p></li><li><p><strong>param</strong>: <em>String</em> msg</p></li><li><p><strong>return</strong>: <em>Array | Object | Number</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>341+</td>342+<td class="code">343+<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">flash</span> = <span class="keyword">function</span>(<span class="variable">type</span>, <span class="variable">msg</span>){344+ <span class="keyword">var</span> <span class="variable">msgs</span> = <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> = <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> || {};345+ <span class="keyword">if</span> (<span class="variable">type</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">msg</span>) {346+ <span class="keyword">var</span> <span class="variable">i</span> = <span class="number integer">2</span>347+ , <span class="variable">args</span> = <span class="variable">arguments</span>348+ , <span class="variable">formatters</span> = <span class="this">this</span>.<span class="variable">app</span>.<span class="variable">flashFormatters</span> || {};349+ <span class="variable">formatters</span>.<span class="variable">__proto__</span> = <span class="variable">flashFormatters</span>;350+ <span class="variable">msg</span> = <span class="variable">utils</span>.<span class="variable">miniMarkdown</span>(<span class="variable">utils</span>.<span class="variable">htmlEscape</span>(<span class="variable">msg</span>));351+ <span class="variable">msg</span> = <span class="variable">msg</span>.<span class="variable">replace</span>(<span class="regexp">/%([a-zA-Z])/g</span>, <span class="keyword">function</span>(<span class="variable">_</span>, <span class="variable">format</span>){352+ <span class="keyword">var</span> <span class="variable">formatter</span> = <span class="variable">formatters</span>[<span class="variable">format</span>];353+ <span class="keyword">if</span> (<span class="variable">formatter</span>) <span class="keyword">return</span> <span class="variable">formatter</span>(<span class="variable">args</span>[<span class="variable">i</span>++]);354+ });355+ <span class="keyword">return</span> (<span class="variable">msgs</span>[<span class="variable">type</span>] = <span class="variable">msgs</span>[<span class="variable">type</span>] || []).<span class="variable">push</span>(<span class="variable">msg</span>);356+ } <span class="keyword">else</span> <span class="keyword">if</span> (<span class="variable">type</span>) {357+ <span class="keyword">var</span> <span class="variable">arr</span> = <span class="variable">msgs</span>[<span class="variable">type</span>];358+ <span class="keyword">delete</span> <span class="variable">msgs</span>[<span class="variable">type</span>];359+ <span class="keyword">return</span> <span class="variable">arr</span> || [];360+ } <span class="keyword">else</span> {361+ <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> = {};362+ <span class="keyword">return</span> <span class="variable">msgs</span>;363+ }364+};365+366+<span class="comment">// Callback for isXMLHttpRequest / xhr</span>367+368+<span class="keyword">function</span> <span class="variable">isxhr</span>() {369+ <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">header</span>(<span class="string">'X-Requested-With'</span>, <span class="string">''</span>).<span class="variable">toLowerCase</span>() === <span class="string">'xmlhttprequest'</span>;370+}</code></pre>371+</td>372+</tr>373+<tr class="code">374+<td class="docs">375+<p>Check if the request was an <em>XMLHttpRequest</em>.</p>376+377+<h2></h2>378+379+<ul><li><p><strong>return</strong>: <em>Boolean</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>380+</td>381+<td class="code">382+<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">__defineGetter__</span>(<span class="string">'isXMLHttpRequest'</span>, <span class="variable">isxhr</span>);383+<span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">__defineGetter__</span>(<span class="string">'xhr'</span>, <span class="variable">isxhr</span>);384+</code></pre>385+</td>386 </tr><tr class="filename"><td><h2 id="lib/express/response.js"><a href="#">response</a></h2></td><td>lib/express/response.js</td></tr><tr class="code">387 <td class="docs">388 <p>Module dependencies.389 </p>374 unmodified lines764 <span class="this">this</span>.<span class="variable">send</span>(<span class="variable">body</span>, { <span class="class">Location</span>: <span class="variable">url</span> }, <span class="variable">status</span>);765 };766 </code></pre>767 </td>549-</tr><tr class="filename"><td><h2 id="lib/express/request.js"><a href="#">request</a></h2></td><td>lib/express/request.js</td></tr><tr class="code">550-<td class="docs">551-<p>Module dependencies.552- </p>553-</td>554-<td class="code">555-<pre><code><span class="keyword">var</span> <span class="variable">http</span> = <span class="variable">require</span>(<span class="string">'http'</span>)556- , <span class="variable">utils</span> = <span class="variable">require</span>(<span class="string">'./utils'</span>)557- , <span class="variable">mime</span> = <span class="variable">require</span>(<span class="string">'connect/utils'</span>).<span class="variable">mime</span>;</code></pre>558-</td>559-</tr>560-<tr class="code">561-<td class="docs">562-<p>Default flash formatters.</p>563-564-<ul><li><p><strong>type</strong>: <em>Object</em></p></li></ul>565-</td>566-<td class="code">567-<pre><code><span class="keyword">var</span> <span class="variable">flashFormatters</span> = <span class="variable">exports</span>.<span class="variable">flashFormatters</span> = {568- <span class="variable">s</span>: <span class="keyword">function</span>(<span class="variable">val</span>){569- <span class="keyword">return</span> <span class="class">String</span>(<span class="variable">val</span>);570- }571-};</code></pre>572-</td>573-</tr>574-<tr class="code">575-<td class="docs">576-<p>Return request header or optional default.</p>577-578-<h2>Examples</h2>579-580-<pre><code>req.header('Content-Type');581-// => "text/plain"582-583-req.header('content-type');584-// => "text/plain"585-586-req.header('Accept');587-// => undefined588-589-req.header('Accept', 'text/html');590-// => "text/html"</code></pre>591-592-<h2></h2>593-594-<ul><li><p><strong>param</strong>: <em>String</em> name</p></li><li><p><strong>param</strong>: <em>String</em> defaultValue</p></li><li><p><strong>return</strong>: <em>String</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>595-</td>596-<td class="code">597-<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">header</span> = <span class="keyword">function</span>(<span class="variable">name</span>, <span class="variable">defaultValue</span>){598- <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">headers</span>[<span class="variable">name</span>.<span class="variable">toLowerCase</span>()] || <span class="variable">defaultValue</span>;599-};</code></pre>600-</td>601-</tr>602-<tr class="code">603-<td class="docs">604-<p>Check if the <em>Accept</em> header is present, and includes the given <code>type</code>.</p>605-606-<p>When the <em>Accept</em> header is not present <code>true</code> is returned. Otherwise607-the given <code>type</code> is matched by an exact match, and then subtypes. You608-may pass the subtype such as "html" which is then converted internally609-to "text/html" using the mime lookup table.</p>610-611-<h2>Examples</h2>612-613-<pre><code>// Accept: text/html614-req.accepts('html');615-// => true616-617-// Accept: text/*; application/json618-req.accepts('html');619-req.accepts('text/html');620-req.accepts('text/plain');621-req.accepts('application/json');622-// => true623-624-req.accepts('image/png');625-req.accepts('png');626-// => false</code></pre>627-628-<h2></h2>629-630-<ul><li><p><strong>param</strong>: <em>String</em> type</p></li><li><p><strong>return</strong>: <em>Boolean</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>631-</td>632-<td class="code">633-<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">accepts</span> = <span class="keyword">function</span>(<span class="variable">type</span>){634- <span class="keyword">var</span> <span class="variable">accept</span> = <span class="this">this</span>.<span class="variable">header</span>(<span class="string">'Accept'</span>);635- <span class="keyword">if</span> (!<span class="variable">accept</span> || <span class="variable">accept</span> === '*</code></pre>636-</td>637-</tr>638-<tr class="code">639-<td class="docs">640-<p>') {641- return true;642- } else if (type) {643- // Allow "html" vs "text/html" etc644- if (type.indexOf('/') < 0) {645- type = mime.types['.' + type];646- }647- // Check if we have a direct match648- if (accept.indexOf(type) >= 0) {649- return true;650- // Check if we have type/<em>651- } else {652- type = type.split('/')[0] + '/</em>';653- return accept.indexOf(type) >= 0;654- }655- } else {656- return false;657- }658-};</p>659-660-<p>/**661-Return the value of param <code>name</code> when present.</p>662-663-<ul><li>Checks route placeholders, ex: <em>/user/:id</em></li><li>Checks query string params, ex: ?id=12</li><li>Checks urlencoded body params, ex: id=12</li></ul>664-665-<p>To utilize urlencoded request bodies, <code>req.body</code>666-should be an object. This can be done by using667-the <code>connect.bodyDecoder</code> middleware.</p>668-669-<h2></h2>670-671-<ul><li><p><strong>param</strong>: <em>String</em> name</p></li><li><p><strong>return</strong>: <em>String</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>672-</td>673-<td class="code">674-<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">param</span> = <span class="keyword">function</span>(<span class="variable">name</span>){675- <span class="comment">// Route params like /user/:id</span>676- <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">params</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {677- <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">params</span>[<span class="variable">name</span>]; 678- }679- <span class="comment">// Query string params</span>680- <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">query</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {681- <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">query</span>[<span class="variable">name</span>]; 682- }683- <span class="comment">// Request body params via connect.bodyDecoder</span>684- <span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">body</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="this">this</span>.<span class="variable">body</span>[<span class="variable">name</span>] !== <span class="variable">undefined</span>) {685- <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">body</span>[<span class="variable">name</span>];686- }687-};</code></pre>688-</td>689-</tr>690-<tr class="code">691-<td class="docs">692-<p>Queue flash <code>msg</code> of the given <code>type</code>.</p>693-694-<h2>Examples</h2>695-696-<pre><code> req.flash('info', 'email sent');697- req.flash('error', 'email delivery failed');698- req.flash('info', 'email re-sent');699- // => 2700-701- req.flash('info');702- // => ['email sent', 'email re-sent']703-704- req.flash('info');705- // => []706-707- req.flash();708- // => { error: ['email delivery failed'], info: [] }</code></pre>709-710-<h2>Formatting</h2>711-712-<p>Flash notifications also support arbitrary formatting support.713-For example you may pass variable arguments to <code>req.flash()</code>714-and use the %s specifier to be replaced by the associated argument:</p>715-716-<pre><code>req.flash('info', 'email has been sent to %s.', userName);</code></pre>717-718-<p>To add custom formatters use the <code>exports.flashFormatters</code> object.</p>719-720-<h2></h2>721-722-<ul><li><p><strong>param</strong>: <em>String</em> type</p></li><li><p><strong>param</strong>: <em>String</em> msg</p></li><li><p><strong>return</strong>: <em>Array | Object | Number</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>723-</td>724-<td class="code">725-<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">flash</span> = <span class="keyword">function</span>(<span class="variable">type</span>, <span class="variable">msg</span>){726- <span class="keyword">var</span> <span class="variable">msgs</span> = <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> = <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> || {};727- <span class="keyword">if</span> (<span class="variable">type</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">msg</span>) {728- <span class="keyword">var</span> <span class="variable">i</span> = <span class="number integer">2</span>729- , <span class="variable">args</span> = <span class="variable">arguments</span>730- , <span class="variable">formatters</span> = <span class="this">this</span>.<span class="variable">app</span>.<span class="variable">flashFormatters</span> || {};731- <span class="variable">formatters</span>.<span class="variable">__proto__</span> = <span class="variable">flashFormatters</span>;732- <span class="variable">msg</span> = <span class="variable">utils</span>.<span class="variable">miniMarkdown</span>(<span class="variable">utils</span>.<span class="variable">htmlEscape</span>(<span class="variable">msg</span>));733- <span class="variable">msg</span> = <span class="variable">msg</span>.<span class="variable">replace</span>(<span class="regexp">/%([a-zA-Z])/g</span>, <span class="keyword">function</span>(<span class="variable">_</span>, <span class="variable">format</span>){734- <span class="keyword">var</span> <span class="variable">formatter</span> = <span class="variable">formatters</span>[<span class="variable">format</span>];735- <span class="keyword">if</span> (<span class="variable">formatter</span>) <span class="keyword">return</span> <span class="variable">formatter</span>(<span class="variable">args</span>[<span class="variable">i</span>++]);736- });737- <span class="keyword">return</span> (<span class="variable">msgs</span>[<span class="variable">type</span>] = <span class="variable">msgs</span>[<span class="variable">type</span>] || []).<span class="variable">push</span>(<span class="variable">msg</span>);738- } <span class="keyword">else</span> <span class="keyword">if</span> (<span class="variable">type</span>) {739- <span class="keyword">var</span> <span class="variable">arr</span> = <span class="variable">msgs</span>[<span class="variable">type</span>];740- <span class="keyword">delete</span> <span class="variable">msgs</span>[<span class="variable">type</span>];741- <span class="keyword">return</span> <span class="variable">arr</span> || [];742- } <span class="keyword">else</span> {743- <span class="this">this</span>.<span class="variable">session</span>.<span class="variable">flash</span> = {};744- <span class="keyword">return</span> <span class="variable">msgs</span>;745- }746-};747-748-<span class="comment">// Callback for isXMLHttpRequest / xhr</span>749-750-<span class="keyword">function</span> <span class="variable">isxhr</span>() {751- <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">header</span>(<span class="string">'X-Requested-With'</span>, <span class="string">''</span>).<span class="variable">toLowerCase</span>() === <span class="string">'xmlhttprequest'</span>;752-}</code></pre>753-</td>754-</tr>755-<tr class="code">756-<td class="docs">757-<p>Check if the request was an <em>XMLHttpRequest</em>.</p>758-759-<h2></h2>760-761-<ul><li><p><strong>return</strong>: <em>Boolean</em> </p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>762-</td>763-<td class="code">764-<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">__defineGetter__</span>(<span class="string">'isXMLHttpRequest'</span>, <span class="variable">isxhr</span>);765-<span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">__defineGetter__</span>(<span class="string">'xhr'</span>, <span class="variable">isxhr</span>);766-</code></pre>767-</td>768 </tr><tr class="filename"><td><h2 id="lib/express/server.js"><a href="#">server</a></h2></td><td>lib/express/server.js</td></tr><tr class="code">769 <td class="docs">770 <p>Module dependencies.771 </p>771 unmodified linesmodified:docs/applications.1+9 added
50 unmodified lines51 .P52 e\-resistable \fIhttp://www\.e\-resistible\.co\.uk/\fR is an online order takeaway system providing an intuitive way to fill your belly from your computer!53 .54 .P55+ \fIhttp://www\.e\-resistible\.co\.uk\fR56+.57+.P58+Top Twitter Trends \fIhttp://toptwittertrends\.com\fR utilizes MongoDB, Socket\.IO, jQuery and many other exciting libraries to bring you trending tweets in realtime\.59+.60+.P61+ \fIhttp://toptwittertrends\.com\fR62+.63+.P64 The applications shown above are not listed in any specific order\. To have an application added or removed please contact TJ Holowaychuk \fIhttp://github\.com/visionmedia\fR\.modified:docs/applications.html+6 added
228 unmodified lines229 <p><a href="http://widescript.com"><img src="images/apps/widescript.png" alt="Widescript" /></a></p>230 231 <p><a href="http://www.e-resistible.co.uk/">e-resistable</a> is an online order takeaway system providing an intuitive way to fill your belly from your computer!</p>232 233+<p><a href="http://www.e-resistible.co.uk"><img src="images/apps/e-resistable.png" alt="Online Takeaway" /></a></p>234+235+<p><a href="http://toptwittertrends.com">Top Twitter Trends</a> utilizes MongoDB, Socket.IO, jQuery and many other exciting libraries to bring you trending tweets in realtime.</p>236+237+<p><a href="http://toptwittertrends.com"><img src="images/apps/toptwittertrends.png" alt="Twitter Trends" /></a></p>238+239 <br />240 241 242 <p>The applications shown above are not listed in any specific order. To have an application added or removed please contact <a href="http://github.com/visionmedia">TJ Holowaychuk</a>.</p>6 unmodified linesmodified:docs/applications.md+6 added
29 unmodified lines3031323334353637383940414229 unmodified lines[](http://widescript.com)
[e-resistable](http://www.e-resistible.co.uk/) is an online order takeaway system providing an intuitive way to fill your belly from your computer!
[](http://www.e-resistible.co.uk)
[Top Twitter Trends](http://toptwittertrends.com) utilizes MongoDB, Socket.IO, jQuery and many other exciting libraries to bring you trending tweets in realtime.
[](http://toptwittertrends.com)
<br />
The applications shown above are not listed in any specific order. To have an application added or removed please contact [TJ Holowaychuk](http://github.com/visionmedia).No newline at end of fileNo newline at end of file