Permalink
Browse files

Merge branch 'master' of github.com:hillct/iodocs

  • Loading branch information...
2 parents 416333b + 76f900b commit d09335106cd44d1a1ea1e09aaa5ad77b652b4f1c @hillct committed Sep 11, 2012
Showing with 12 additions and 2 deletions.
  1. +2 −1 app.js
  2. +10 −1 public/javascripts/docs.js
View
3 app.js
@@ -668,7 +668,8 @@ app.post('/processReq', oauth, processRequest, function(req, res) {
var result = {
headers: req.resultHeaders,
response: req.result,
- call: req.call
+ call: req.call,
+ code: req.res.statusCode
};
res.send(result);
View
@@ -207,6 +207,10 @@
resultContainer.append($(document.createElement('h4')).text('Call'));
resultContainer.append($(document.createElement('pre')).addClass('call'));
+ // Code
+ resultContainer.append($(document.createElement('h4')).text('Response Code'));
+ resultContainer.append($(document.createElement('pre')).addClass('code prettyprint'));
+
// Header
resultContainer.append($(document.createElement('h4')).text('Response Headers'));
resultContainer.append($(document.createElement('pre')).addClass('headers prettyprint'));
@@ -256,6 +260,11 @@
.text(response.call);
}
+ if (response.code) {
+ $('pre.code', resultContainer)
+ .text(response.code);
+ }
+
if (response.headers) {
$('pre.headers', resultContainer)
.text(formatJSON(response.headers));
@@ -288,4 +297,4 @@
})
})
-})();
+})();

0 comments on commit d093351

Please sign in to comment.