Skip to content

Commit

Permalink
Cleaned up some whitespace and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanmikaelian committed Apr 29, 2012
1 parent 8271af8 commit 00ad6fb
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions lib/battlenet.js
@@ -1,19 +1,24 @@
var client = (function() {
var http = require("scoped-http-client");
var client = (function () {
var http, scopedClient, get;

var scopedClient = function(url) {
http = require("scoped-http-client");

scopedClient = function (url) {
return http.create(url);
}
};

var get = function(options, callback) {
get = function(options, callback) {
scopedClient(options.host)
.header('accept', 'application/json')
.path(options.path)
.query(options.query)
.get()(function(err, resp, body) {
if(resp.statusCode === 200) {
if (resp.statusCode === 200) {
callback(JSON.parse(body));
}
else {
throw err;
}
});
}

Expand Down

0 comments on commit 00ad6fb

Please sign in to comment.