Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Sep 28, 2017
1 parent 0e85681 commit 96f3df8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions lib/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Request.prototype.agent = function(agent){
};

/**
* Set _Content-Type_ response header passed through `mime.lookup()`.
* Set _Content-Type_ response header passed through `mime.getType()`.
*
* Examples:
*
Expand All @@ -261,11 +261,11 @@ Request.prototype.agent = function(agent){
Request.prototype.type = function(type){
return this.set('Content-Type', ~type.indexOf('/')
? type
: mime.lookup(type));
: mime.getType(type));
};

/**
* Set _Accept_ response header passed through `mime.lookup()`.
* Set _Accept_ response header passed through `mime.getType()`.
*
* Examples:
*
Expand All @@ -287,7 +287,7 @@ Request.prototype.type = function(type){
Request.prototype.accept = function(type){
return this.set('Accept', ~type.indexOf('/')
? type
: mime.lookup(type));
: mime.getType(type));
};

/**
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "superagent",
"version": "3.6.0",
"version": "3.6.1",
"description": "elegant & feature rich browser / node HTTP with a fluent API",
"scripts": {
"prepublish": "make all",
Expand All @@ -26,25 +26,25 @@
"dependencies": {
"component-emitter": "^1.2.0",
"cookiejar": "^2.1.0",
"debug": "^3.0.0",
"debug": "^3.1.0",
"extend": "^3.0.0",
"form-data": "^2.1.1",
"form-data": "^2.3.1",
"formidable": "^1.1.1",
"methods": "^1.1.1",
"mime": "^1.3.6",
"qs": "^6.4.0",
"mime": "^2.0.3",
"qs": "^6.5.1",
"readable-stream": "^2.0.5"
},
"devDependencies": {
"Base64": "^1.0.1",
"basic-auth-connect": "^1.0.0",
"body-parser": "^1.17.0",
"body-parser": "^1.18.2",
"browserify": "^14.1.0",
"cookie-parser": "^1.4.3",
"express": "^4.15.2",
"express-session": "^1.15.0",
"express": "^4.16.0",
"express-session": "^1.15.6",
"marked": "^0.3.6",
"mocha": "^3.1.2",
"mocha": "^3.5.3",
"multer": "^1.3.0",
"should": "^11.2.0",
"should-http": "^0.1.1",
Expand Down
2 changes: 1 addition & 1 deletion test/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ describe('request', function(){
.accept('xml')
.end(function(err, res){
try {
res.header['accept'].should.equal('text/xml');
res.header['accept'].should.equal('application/xml');
done();
} catch(e) { done(e); }
});
Expand Down
2 changes: 1 addition & 1 deletion test/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ it('request .accept() with xml', function(next){
.accept('xml')
.end(function(err, res){
try {
assert.equal('text/xml', res.text, res.text);
assert.equal('application/xml', res.text, res.text);
next();
} catch(e) { next(e); }
});
Expand Down

0 comments on commit 96f3df8

Please sign in to comment.