diff --git a/lib/request.js b/lib/request.js index 372a9915e9..e30e2625e5 100644 --- a/lib/request.js +++ b/lib/request.js @@ -141,9 +141,8 @@ req.accepts = function(){ * @public */ -req.acceptsEncodings = function(){ - var accept = accepts(this); - return accept.encodings.apply(accept, arguments); +req.acceptsEncodings = function(...encodings) { + return accepts(this).encodings(...encodings); }; /**