with_config function

Execute code with configuration set.

Execute code with configuration set.

with_config(config = config(), expr, override = FALSE) with_verbose(expr, ...)

Arguments

  • config: Settings as generated by add_headers(), set_cookies() or authenticate().
  • expr: code to execute under specified configuration
  • override: if TRUE, ignore existing settings, if FALSE, combine new config with old.
  • ...: Other arguments passed on to verbose()

Examples

with_config(verbose(), { GET("http://had.co.nz") GET("http://google.com") }) # Or even easier: with_verbose(GET("http://google.com"))

See Also

Other ways to set configuration: config(), set_config()

  • Maintainer: Hadley Wickham
  • License: MIT + file LICENSE
  • Last published: 2023-08-15