-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Update 5x API docs with missing 4x changes #1886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update 5x API docs with missing 4x changes #1886
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, LGTM!👍
@@ -1,7 +1,15 @@ | |||
<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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app.post('/profile', (req, res, next) => { | |
app.post('/profile', (req, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to use callback
instead of fn
. And update line 42 for better readability and consistency.
WDYT?
@ShubhamOulkar, if you want, you can open a PR with those changes you're proposing. |
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.