diff --git a/en/guide/migrating-5.md b/en/guide/migrating-5.md index 55c6b527f1..c4fdd75e02 100755 --- a/en/guide/migrating-5.md +++ b/en/guide/migrating-5.md @@ -31,6 +31,7 @@ You can then run your automated tests to see what fails, and fix problems accord
  • req.param(name)
  • res.json(obj, status)
  • res.jsonp(obj, status)
  • +
  • res.redirect('back') and res.location('back')
  • res.redirect(url, status)
  • res.send(body, status)
  • res.send(status)
  • @@ -47,8 +48,8 @@ You can then run your automated tests to see what fails, and fix problems accord
  • req.body
  • req.host
  • req.query
  • -
  • res.status
  • res.clearCookie
  • +
  • res.status
  • res.vary
  • @@ -104,6 +105,11 @@ Express 5 no longer supports the signature `res.jsonp(obj, status)`. Instead, se Express 5 no longer supports the signature `res.redirect(url, status)`. Instead, use the following signature: `res.redirect(status, url)`. + +

    res.redirect('back') and res.location('back')

    + +Express 5 no longer supports the magic string `back` in the `res.redirect()` and `res.location()` methods. Instead, use the `req.get('Referrer') || '/'` value to redirect back to the previous page. In Express 4, the res.`redirect('back')` and `res.location('back')` methods were deprecated. +

    res.send(body, status)

    Express 5 no longer supports the signature `res.send(obj, status)`. Instead, set the status and then chain it to the `res.send()` method like this: `res.status(status).send(obj)`.