Update 5x API docs with missing 4x changes#1886
Merged
bjohansebas merged 7 commits intoexpressjs:gh-pagesfrom May 1, 2025
Merged
Update 5x API docs with missing 4x changes#1886bjohansebas merged 7 commits intoexpressjs:gh-pagesfrom
bjohansebas merged 7 commits intoexpressjs:gh-pagesfrom
Conversation
expressjs@5c98ee4 Co-authored-by: Douglas Christopher Wilson <doug@somethingdoug.com>
expressjs#1402 Co-authored-by: Jon Ege Ronnenberg <jon.ronnenberg@gmail.com>
expressjs@5e918ea Co-authored-by: Douglas Christopher Wilson <doug@somethingdoug.com>
expressjs@fcaca7f Co-authored-by: Douglas Christopher Wilson <doug@somethingdoug.com>
expressjs#1456 Co-authored-by: Rich Hodgkins <rhodgkins@gmail.com>
expressjs@a5ca5b0 Co-Authored-By: Douglas Wilson <doug@somethingdoug.com>
expressjs#1063 Co-Authored-By: Mo <hematy61@gmail.com>
✅ Deploy Preview for expressjscom-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
15 tasks
| <h3 id='req.acceptsLanguages'>req.acceptsLanguages(lang [, ...])</h3> | ||
| <h3 id='req.acceptsLanguages'>req.acceptsLanguages([lang, ...])</h3> | ||
|
|
||
| Returns the first accepted language of the specified languages, |
Member
There was a problem hiding this comment.
Suggested change
| Returns the first accepted language of the specified languages, | |
| Returns the first accepted language from the specified languages, |
| app.use(express.json()) // for parsing application/json | ||
| app.use(express.urlencoded({ extended: true })) // for parsing application/x-www-form-urlencoded | ||
|
|
||
| app.post('/profile', (req, res, next) => { |
Member
There was a problem hiding this comment.
Suggested change
| app.post('/profile', (req, res, next) => { | |
| app.post('/profile', (req, res) => { |
Member
There was a problem hiding this comment.
Change 'Sets cookie name to value.' to 'Sets the cookie with the specified name to the given value.' line no. 3
| | `priority` | String | Value of the "Priority" **Set-Cookie** attribute. | ||
| | `secure` | Boolean | Marks the cookie to be used with HTTPS only. | ||
| | `signed` | Boolean | Indicates if the cookie should be signed. | ||
| | `sameSite` | Boolean or String | Value of the "SameSite" **Set-Cookie** attribute. More information at [https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-4.1.1](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-4.1.1). |
Member
There was a problem hiding this comment.
Suggested change
| | `sameSite` | Boolean or String | Value of the "SameSite" **Set-Cookie** attribute. More information at [https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-4.1.1](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-4.1.1). | |
| | `sameSite` | Boolean or String | Value of the "SameSite" **Set-Cookie** attribute. See [SameSite cookie specifications](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-4.1.1) for more details. |
Member
There was a problem hiding this comment.
I think it is better to use callback instead of fn. And update line 42 for better readability and consistency.
WDYT?
bjohansebas
approved these changes
May 1, 2025
Member
|
@ShubhamOulkar, if you want, you can open a PR with those changes you're proposing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses most of updates to Express 4 API docs that are not present in v5 and were listed in the TODO section of #1881.
All commits reference respective commits/PRs that introduced those changes to 4.x documentation.