Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Cookies and QueryString support

Compare
Choose a tag to compare
@aeberdinelli aeberdinelli released this 16 Jul 23:13
· 14 commits to master since this release

New helpers for cookies:

  • $res->cookie($name, $value, $settings) - sets a cookie
  • $res->clearCookie($name) - removes a cookie
  • $req->cookies - gets the cookies

Querystring now supported:

  • $req->query - contains the querystring params

New helpers for redirections:

  • $res->location($url) - redirects using Location header
  • $res->redirect($url) - redirects using 302 http code
  • $res->redirect($url, true) - redirects using 301 (http permanent redirect code)

Also:

  • Added $res->download($path, $name) - forces the download of a file
  • Added $express->getInfo() - retrieves all the info from the current request
  • App locals now supported in object $express->locals