Set (and reset) global httr configuration.
Arguments
- config
Settings as generated by
add_headers(),set_cookies()orauthenticate().- override
if
TRUE, ignore existing settings, ifFALSE, combine new config with old.
See also
Other ways to set configuration:
config(),
with_config()
Examples
GET("http://google.com")
#> Response [http://www.google.com/]
#> Date: 2026-09-01 14:21
#> Status: 200
#> Content-Type: text/html; charset=ISO-8859-1
#> Size: 83.2 kB
#> <!doctype html><html itemscope="" itemtype="http://schema.org/WebPag...
#> var h=this||self;var k=/#|$/;function l(a,c){var e=a.search(k);a:{va...
#> function t(a,c,e,b,f){var d="";c.search("&ei=")===-1&&(d="&ei="+p(b)...
#> document.documentElement.addEventListener("submit",function(b){var a...
#> try{
#> _._F_toggles_initialize=function(a){(typeof globalThis!=="undefined"...
#> /*
#>
#> Copyright The Closure Library Authors.
#> SPDX-License-Identifier: Apache-2.0
#> ...
set_config(verbose())
GET("http://google.com")
#> Response [http://www.google.com/]
#> Date: 2026-09-01 14:21
#> Status: 200
#> Content-Type: text/html; charset=ISO-8859-1
#> Size: 83.2 kB
#> <!doctype html><html itemscope="" itemtype="http://schema.org/WebPag...
#> var h=this||self;var k=/#|$/;function l(a,c){var e=a.search(k);a:{va...
#> function t(a,c,e,b,f){var d="";c.search("&ei=")===-1&&(d="&ei="+p(b)...
#> document.documentElement.addEventListener("submit",function(b){var a...
#> try{
#> _._F_toggles_initialize=function(a){(typeof globalThis!=="undefined"...
#> /*
#>
#> Copyright The Closure Library Authors.
#> SPDX-License-Identifier: Apache-2.0
#> ...
reset_config()
GET("http://google.com")
#> Response [http://www.google.com/]
#> Date: 2026-09-01 14:21
#> Status: 200
#> Content-Type: text/html; charset=ISO-8859-1
#> Size: 83.2 kB
#> <!doctype html><html itemscope="" itemtype="http://schema.org/WebPag...
#> var h=this||self;var k=/#|$/;function l(a,c){var e=a.search(k);a:{va...
#> function t(a,c,e,b,f){var d="";c.search("&ei=")===-1&&(d="&ei="+p(b)...
#> document.documentElement.addEventListener("submit",function(b){var a...
#> try{
#> _._F_toggles_initialize=function(a){(typeof globalThis!=="undefined"...
#> /*
#>
#> Copyright The Closure Library Authors.
#> SPDX-License-Identifier: Apache-2.0
#> ...