Skip to content

Commit

Permalink
Set content-type specifically
Browse files Browse the repository at this point in the history
  • Loading branch information
sideroad committed Jul 21, 2014
1 parent 6aa78a8 commit 03e39f5
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,19 @@
that.renderGraph();
});

request.get('tests/results.json', function(res){
that.results = res.body;
});

request.get('tests/locations.json', function(res){
that.locations = res.body;
that.location = _.chain(that.locations).keys().first().value();
that.url = _.chain(that.urls).keys().first().value();
});
request.get('tests/results.json')
.set('Content-Type', 'application/json')
.end(function(res){
that.results = res.body;
});

request.get('tests/locations.json')
.set('Content-Type', 'application/json')
.end(function(res){
that.locations = res.body;
that.location = _.chain(that.locations).keys().first().value();
that.url = _.chain(that.urls).keys().first().value();
});

},
computed: {
Expand Down Expand Up @@ -113,9 +117,11 @@
_(this.testIds).each(function(testId){
var dfd = Q.defer();

request.get('tests/'+testId+'.json', function(res){
dfd.resolve(res.body);
});
request.get('tests/'+testId+'.json')
.set('Content-Type', 'application/json')
.end(function(res){
dfd.resolve(res.body);
});
requests.push(dfd.promise);
});

Expand Down

0 comments on commit 03e39f5

Please sign in to comment.