Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Pretty-print the JSON output. #13

Merged
merged 1 commit into from

2 participants

Ryan Kelly Jared Hirsch
Ryan Kelly
Owner
rfk commented

This makes it much nicer when hitting the restmail.net REST API by
hand, in a browser.

Ryan Kelly rfk Pretty-print the JSON output.
This makes it much nicer when hitting the restmail.net REST API by
hand, in a browser.
282425b
Jared Hirsch
Owner

looks great, merging in. @rfk do you know how to deploy to restmail? my key isn't onboard.

Jared Hirsch 6a68 merged commit 584c932 into from
Jared Hirsch 6a68 deleted the branch
Jared Hirsch
Owner

@rfk as I said in the other issue, I've got keys onboard, and your key is onboard as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 5, 2013
  1. Ryan Kelly

    Pretty-print the JSON output.

    rfk authored
    This makes it much nicer when hitting the restmail.net REST API by
    hand, in a browser.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  webserver.js
3  webserver.js
View
@@ -47,7 +47,8 @@ app.get('/mail/:user', function(req, res) {
arr.push(JSON.parse(r));
} catch(e) { }
});
- res.json(arr);
+ res.setHeader("Content-Type", "application/json");
+ res.send(JSON.stringify(arr, undefined, 2));
}
});
});
Something went wrong with that request. Please try again.