Announcing the Plumber v0.4.4 Release
Plumber is a package which allows you to create web APIs from your R code. If you're new to Plumber, you can find out more at www.rplumber.io.
We're excited to announce the v0.4.4 release of Plumber! This release adds a handful of oft-requested features and cleans up a few issues that came out of the major refactor that took place in the 0.4.2 release. We've also continued to expand the official Plumber documentation. We'll mention the highlights below, but you can see the full release notes for v0.4.4 here. The release is on CRAN now, so you can update using:
install.packages("plumber")
Plumber v0.4.4 Highlights
- Support customized image sizes on the
@png
and@jpeg
annotations. More details here. - Support expiration,
HTTPOnly
, andSecure
flags on cookies as discussed here (but see the "Known Bugs" section below for an important note about cookie expiration in v0.4.4). - Restore functionality of
PlumberStatic
routers (#156). - Support arguments sent from clients to nested subrouters.
- For APIs deployed using DigitalOcean, set the working directory to the root of the API before starting.
- Restore functionality of
setErrorHandler
. - Ignore capitalization when searching for
plumber.r
andentrypoint.r
files whenplumb()
ing a directory. - Support query strings with keys that appear more than once (#165)
- Fix the validation error warning at the bottom of deployed Swagger files
which would have appeared any time your
swagger.json
file was hosted in such a way that a hosted validator service would not have been able to access it. For now we just suppress validation ofswagger.json
files. (#149) - Support for floating IPs in DNS check that occurs in
do_configure_https()
- Make adding swap file idempotent in
do_provision()
so you can now call that function on a single droplet multiple times. - Support an
exit
hook which can define a function that will be evaluated when the API is interrupted. e.g.pr <- plumb("plumber.R"); pr$registerHook("exit", function(){ print("Bye bye!") })
- Fixed bug in which a single function couldn't support multiple paths for a single verb (#203).
Known Bugs
At the time of writing, one bug has already been fixed since the v0.4.4 release. Cookie expiration times were not properly being sent to clients which caused most clients to ignore these times altogether and revert back to using session cookies. If you wish to set an expiration time on a cookie, you will need to use the development release of Plumber which you can install using:
devtools::install_github("trestletech/plumber")