This handle preserves settings and cookies across multiple requests. It is the foundation of all requests performed through the httr package, although it will mostly be hidden from the user.
handle(url, cookies = TRUE)
| url | full url to site |
|---|---|
| cookies | DEPRECATED |
Because of the way argument dispatch works in R, using handle() in the
http methods (See GET()) will cause problems when trying to
pass configuration arguments (See examples below). Directly specifying the
handle when using http methods is not recommended in general, since the
selection of the correct handle is taken care of when the user passes an url
(See handle_pool()).
handle("http://google.com")#> Host: http://google.com <NA>handle("https://google.com")#> Host: https://google.com <NA>#> Response [http://www.google.com/] #> Date: 2020-08-17 22:22 #> Status: 200 #> Content-Type: text/html; charset=ISO-8859-1 #> Size: 13 kB #> <!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="... #> document.documentElement.addEventListener("submit",function(b){var a;if(a=b.t... #> var a=window.location,b=a.href.indexOf("#");if(0<=b){var c=a.href.substring(b... #> </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="AINFCbYAAAAAXzsRO... #> setTimeout(function(){var b=document;var a="SCRIPT";"application/xhtml+xml"==... #> function _F_installCss(c){}#> Response [http://www.google.com/] #> Date: 2020-08-17 22:22 #> Status: 200 #> Content-Type: text/html; charset=ISO-8859-1 #> Size: 13 kB #> <!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="... #> document.documentElement.addEventListener("submit",function(b){var a;if(a=b.t... #> var a=window.location,b=a.href.indexOf("#");if(0<=b){var c=a.href.substring(b... #> </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="AINFCbYAAAAAXzsRO... #> setTimeout(function(){var b=document;var a="SCRIPT";"application/xhtml+xml"==... #> function _F_installCss(c){}h <- handle("http://google.com", cookies = FALSE)#> Warning: Cookies argument is deprecated#> domain flag path secure expiration name #> 1 .google.com TRUE / TRUE 2020-09-16 18:22:34 1P_JAR #> 2 #HttpOnly_.google.com TRUE / FALSE 2021-02-16 17:22:34 NID #> value #> 1 2020-08-17-22 #> 2 204=kNRdIfhUUiMxKu7KxroUld3gxw1xnN2ybdIMAbbG1QOss9k1NuDH4BJ1ZX6SON13gX_G_OvqDi_FZKbhPBZoMTCE2x2oUHn43IBYBcfxM7sXybJZUilK8WiC_KTBIiZPac_bwoGIljauoQBzL_Exa7NQBieTMR_69zyzRrh34t0