Refactor: simplify req.acceptsEncodings with spread syntax
Replaced use of arguments in req.acceptsEncodings with the spread syntax (...encodings) to improve readability and reduce code complexity, while maintaining the same functionality.
already added https://github.com/expressjs/express/pull/6086
already added #6086
Hello @Abdel-Monaam-Aouini Thanks for your input on this! I went with a slightly different approach to keep things concise by calling accepts(this).encodings(...encodings) directly, avoiding the intermediate accept variable. This makes the code a bit more streamlined and skips a minor, unnecessary allocation. I thought this might be more consistent with our style, but I’m happy to discuss if you see other benefits to your approach!