vignettes/files/apis/07-01-plot-unsafe.R

#* This is an example of an UNSAFE endpoint which
#* is vulnerable to a DOS attack.
#* @get /
#* @query pts:integer(10)
#* @serializer png
function(query) {
  # An example of an UNSAFE endpoint.
  plot(1:query$pts)
}

Try the plumber2 package in your browser

Any scripts or data that you put into this service are public.

plumber2 documentation built on Jan. 20, 2026, 5:06 p.m.