Skip to content

Belgae

Compare
Choose a tag to compare
@JohnCoene JohnCoene released this 01 Mar 20:18
· 151 commits to master since this release

Breaking change

The render and send_file methods of the Response object now
expect the full path to the template, with the file extension.
Where one would before res$render("home"), now one
res$render("templates/home.html").
Similarly, in said templates, to import partials,
use full path relative to the template in which the partial is used
e.g.: from [! header.html !] to
[! partials/header.html !].

Changes

  • Middleware no longer uses global environment that may cause side effect
    across sessions.
  • set and get methods on request store in environment to allow
    locking variables when using set.
  • Better instructions for deploying as a service.
  • Remove the deprecated Logger class, see log package.
  • Pass host to free port fetch function.
  • Add hidden option to force change port for upcoming related service.
  • Internals of calls reworked to share response object.
    This is how it should always have worked, it allows middlewares to
    updatre request and response to be used/passed to subsequent calls.
  • Middleware check for run has been fixed.
  • Document and export the Response class.
  • Added pre-hook to response.
  • Document and export Request class.
  • set and get methods on Request and Response accept character
    strings as name.
  • Use R 4.1.0 + add Depends
  • Allow passing a list of functions to use to easily se multiple
    middlewares at once.
  • render method correctly sets the Content-type header.
  • headers method more robust to avoid duplicated headers.
  • Add token_create function.
  • Add cookie method to the Response class to easily set cookies.
  • Add cookie field to Request to hold parsed HTTP_COOKIE.
  • Properly URL decode query string values.
  • Add sendf method to Response class to pre-process request
    with sprintf.
  • Silently read templates, no more EOF warnings.
  • More informative print messages for classes.
  • Add post render hooks to response.
  • Added get_headers method to Response to retrieve currently set headers.
  • Unlock objects to allow adding new elements to Response and Request.
  • Upgrade websocket protocol if on HTTPS protocol.
  • Improved the default log.
  • log argument of ambiorix constructor now defaults to TRUE.
  • Added md method to Response to render .md files.
  • Added set_log* functions to allow using custom logs.