httr (version 0.4)

with_config: Execute code with configuration set.

Description

Execute code with configuration set.

Usage

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

with_verbose(expr, ...)

Arguments

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

See Also

Other ways to set configuration: config; reset_config, set_config

Examples

Run this code
with_config(verbose(), {
  GET("http://had.co.nz")
  GET("http://google.com")
})

# Or even easier:
with_verbose(GET("http://google.com"))

Run the code above in your browser using DataCamp Workspace