pr_set_parsers | R Documentation |
By default, Plumber will parse JSON, text, query strings, octet streams, and multipart bodies. This function updates the default parsers for any endpoint that does not define their own parsers.
pr_set_parsers(pr, parsers)
pr |
A Plumber API. Note: The supplied Plumber API object will also be updated in place as well as returned by the function. |
parsers |
Can be one of:
If the parser name Example: # provide a character string parsers = "json" # provide a named list with no arguments parsers = list(json = list()) # provide a named list with arguments; include `rds` parsers = list(json = list(simplifyVector = FALSE), rds = list()) # default plumber parsers parsers = c("json", "form", "text", "octet", "multi") |
Note: The default set of parsers will be completely replaced if any value is supplied. Be sure to include all of your parsers that you would like to include.
Use registered_parsers()
to get a list of available parser names.
The Plumber router with the new default PlumberEndpoint parsers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.