Skip to content

Conversation

@dotnetCarpenter
Copy link
Contributor

Calling req.acceptsLanguages without argument(s) returns an array of languages from the HTTP Accept-Language header.

This is much easier than calling req.get('Accept-Language'), because you do not need to parse the Accept-Language header string.

Close #1401

Calling req.acceptsLanguages without argument(s) returns an array of languages from the HTTP Accept-Language header.
This is much easier than calling req.get('Accept-Language') because you do not need to parse the Accept-Language header string.

Close expressjs#1401
Copy link
Member

@UlisesGascon UlisesGascon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crandmck crandmck self-requested a review March 4, 2024 01:57
@crandmck crandmck merged commit cb58132 into expressjs:gh-pages Mar 4, 2024
@dotnetCarpenter dotnetCarpenter deleted the patch-1 branch March 20, 2024 22:26
krzysdz added a commit to krzysdz/expressjs.com that referenced this pull request Apr 24, 2025
krzysdz added a commit to krzysdz/expressjs.com that referenced this pull request Apr 25, 2025
bjohansebas pushed a commit that referenced this pull request May 1, 2025
* Include 4.18 API doc updates in 5.x

5c98ee4

Co-authored-by: Douglas Christopher Wilson <[email protected]>

* Copy acceptsLanguages documentation improvements to 5.x

#1402

Co-authored-by: Jon Ege Ronnenberg <[email protected]>

* Add warning boxes to {app,res}.render

5e918ea

Co-authored-by: Douglas Christopher Wilson <[email protected]>

* Copy warning around securing locals to 5.x

fcaca7f

Co-authored-by: Douglas Christopher Wilson <[email protected]>

* Copy res.cookie `partitioned` option docs

#1456

Co-authored-by: Rich Hodgkins <[email protected]>

* Update req.body to point to built-in middleware

a5ca5b0

Co-Authored-By: Douglas Wilson <[email protected]>

* Copy setting multiple cookies example to 5.x

#1063

Co-Authored-By: Mo <[email protected]>

---------

Co-authored-by: krzysdz <[email protected]>
Co-authored-by: Douglas Christopher Wilson <[email protected]>
Co-authored-by: Jon Ege Ronnenberg <[email protected]>
Co-authored-by: Rich Hodgkins <[email protected]>
Co-authored-by: Mo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation bug in request.acceptsLanguages

3 participants