Set (and reset) global httr configuration.

set_config(config, override = FALSE)

reset_config()

Arguments

config

Settings as generated by add_headers(), set_cookies() or authenticate().

override

if TRUE, ignore existing settings, if FALSE, combine new config with old.

Value

invisibility, the old global config.

See also

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

Examples

GET("http://google.com")
#> Response [http://www.google.com/] #> Date: 2021-03-29 17:15 #> Status: 200 #> Content-Type: text/html; charset=ISO-8859-1 #> Size: 13.6 kB #> <!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="... #> var f,h=[];function k(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("e... #> function m(a,b,c,d,g){var e="";c||-1!=b.search("&ei=")||(e="&ei="+k(d),-1==b.... #> document.documentElement.addEventListener("submit",function(b){var a;if(a=b.t... #> </style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;over... #> if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.fo... #> } #> })();</script><div id="mngb"><div id=gbar><nobr><b class=gb1>Search</b> <a cl... #> else top.location='/doodles/';};})();</script><input value="AINFCbYAAAAAYGIZL... #> var d=this||self,e=/^[\w+/_-]+[=]{0,2}$/,f=null,g=function(a){return(a=a.quer... #> ...
set_config(verbose()) GET("http://google.com")
#> Response [http://www.google.com/] #> Date: 2021-03-29 17:15 #> Status: 200 #> Content-Type: text/html; charset=ISO-8859-1 #> Size: 13.6 kB #> <!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="... #> var f,h=[];function k(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("e... #> function m(a,b,c,d,g){var e="";c||-1!=b.search("&ei=")||(e="&ei="+k(d),-1==b.... #> document.documentElement.addEventListener("submit",function(b){var a;if(a=b.t... #> </style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;over... #> if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.fo... #> } #> })();</script><div id="mngb"><div id=gbar><nobr><b class=gb1>Search</b> <a cl... #> else top.location='/doodles/';};})();</script><input value="AINFCbYAAAAAYGIZL... #> var d=this||self,e=/^[\w+/_-]+[=]{0,2}$/,f=null,g=function(a){return(a=a.quer... #> ...
reset_config() GET("http://google.com")
#> Response [http://www.google.com/] #> Date: 2021-03-29 17:15 #> Status: 200 #> Content-Type: text/html; charset=ISO-8859-1 #> Size: 13.6 kB #> <!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="... #> var f,h=[];function k(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("e... #> function m(a,b,c,d,g){var e="";c||-1!=b.search("&ei=")||(e="&ei="+k(d),-1==b.... #> document.documentElement.addEventListener("submit",function(b){var a;if(a=b.t... #> </style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;over... #> if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.fo... #> } #> })();</script><div id="mngb"><div id=gbar><nobr><b class=gb1>Search</b> <a cl... #> else top.location='/doodles/';};})();</script><input value="AINFCbYAAAAAYGIZL... #> var d=this||self,e=/^[\w+/_-]+[=]{0,2}$/,f=null,g=function(a){return(a=a.quer... #> ...