Skip to content

The default behaviour is to use write_memory(), which caches the response locally in memory. This is useful when talking to APIs as it avoids a round-trip to disk. If you want to save a file that's bigger than memory, use write_disk() to save it to a known path.

Usage

write_disk(path, overwrite = FALSE)

write_memory()

Arguments

path

Path to content to.

overwrite

Will only overwrite existing path if TRUE.

Examples

tmp <- tempfile()
r1 <- GET("https://www.google.com", write_disk(tmp))
readLines(tmp)
#> Warning: incomplete final line found on '/tmp/RtmpD2YqfF/file19866137f42f'
#>  [1] "<!doctype html><html itemscope=\"\" itemtype=\"http://schema.org/WebPage\" lang=\"en\"><head><meta content=\"Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.\" name=\"description\"><meta content=\"noodp, \" name=\"robots\"><meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\"><meta content=\"/images/branding/googleg/1x/googleg_standard_color_128dp.png\" itemprop=\"image\"><title>Google</title><script nonce=\"WERd3jSj1HJrU5Zlev9A6g\">(function(){var _g={kEI:'qpqPaaX3E4edkPIP2_2j8Qc',kEXPI:'0,1304203,2935842,48791,30022,6398,9707,344796,42344368,25228681,123988,28395,65168,39770,75317,23259,37800,28333,48296,608,27663,3,2745,7707,7,14750,18635,26230,2863,1,726,5244,14405,2352,33266,13074,20678,200,11682,655,5781,9743,2646,13254,10992,1472,2,1,13030,1383,1,2,1515,3355,197,570,2863,2380,2,4205,1,16100,2,873,2,2230,5108,3008,28,767,4074,4,5393,13781,2,13369,1035,4302,310,535,845,1201,2,11,2,1560,3,5941,1009,2,1746,4,537,4341,5773,4542,4,2171,72,241,296,1,1117,389,4,2605,42,5,2698,2870,298,9253,850,425,7,1784,1050,2,1914,5,2843,1175,6438,2,5724,9,602,95,1554,4,3385,3458,3665,1,2,560,243,2,1360,2,2356,2576,60,1,8,205,441,158,2,1645,191,4,1928,2,1636,544,4,945,622,114,919,1,1399,187,2105,5,259,5,197,1921,209,236,19,1421,119,4,2364,356,3,2004,5,39,416,217,212,3,1583,139,4,51,4,2301,1043,446,4,76,1974,265,106,5,3,971,4,966,5,1125,1,2,2,2648,3,1099,4,32,4,130,6,711,507,2,1347,4,40,4,2110,4,438,323,1,2352,1628,4,232,42,5,2,396,79,708,4,14,3,1,449,4,8,354,368,5,75,4,1915,1,24,4,894,537,60,1503,1,1090,2,265,647,55,6693,13,508,107,69,648,746,4,331,4,93,281,569,439,1,4,24,55,260,615,80,7,819,1426,4,281,264,562,1,2971,500,352,3289,644,3,2766,4,11,34,1372,307,414,4,961,4,122,336,5,152,1,807,20997719,1717,7635,5,2992,4,2960,3,8491,2,1558,3,2691,3,9181,536,2,2460,1195,3,746,6,1149,3,5578,1,6494629,1638,260,947,1369,2,1694,390,1558,563,781,148,995,614,1998972,1625139,210234,12493713,254533,2069,48951,5,4054251,215,917,44,5,116,590,5,1294,2322,1,1,69,3,6,290,317,4,65,388,2,707,289,4,23,144,4,549,72,148,4,1,2,2,550,4,895,3,1045,2,465,218,5,3357,1,23,1,93,36,1,2,869,1,2,11,2,16,40,3,351,208,11,1792,207,8,1484,40,4,373,139,216,2,383,2671,596,1,2,66,2,531,85,37,5,231,92,2,466,373,420,293,115,126,2,375,5,142,4,942,10,14,49,307,526,1,92,267,34,169,300,213,249,99,467,170,7,51,220,154,813,2,275,130,254,69,483,473,2,3,1,5,333,599,301,71,771,101,136,102,1,2,708,186,5,2,7,116,417,205,4,42,172,7,12,3,1037,4,1,2,2,928,4,300,218,86,281,135,2,1,3,1,2,3,2,2,2,2,1,3,1,3,2,1,3,1,2,2,2,3,2,1,3,2,2,2,2,2,1,3,2,2,1,3,2,2,2,2,2,2,2,1,3,9,2,2,3,2,1,10,3,1,3,1,3,9,3,2,2,2,1,11,1,3,1,3,2,1,3,1,2,2,2,2,2,2,2,3,2,2,2,1,2,3,1,3,1,3,1,2,3,2,1,3,1,3,1,2,3,2,1,2,2,3,1,2,2,11,1,3,1,3,2,10,2,2,2,1,3,10,1,2,3,1,3,276,60,142,127,34,10,312,4,1,2,2,221,364,626,5,843,666,1129,8,292,147,257,77,17,678,348,1,2,365,5,4,4,455,4,1,2,2,303,442,245,513,2185,2041',kBL:'04oB',kOPI:89978449};(function(){var a;((a=window.google)==null?0:a.stvsc)?google.kEI=_g.kEI:window.google=_g;}).call(this);})();(function(){google.sn='webhp';google.kHL='en';google.rdn=true;})();(function(){"
#>  [2] "var g=this||self;function k(){return window.google&&window.google.kOPI||null};var l,m=[];function n(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute(\"eid\")));)a=a.parentNode;return b||l}function p(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute(\"leid\")));)a=a.parentNode;return b}function q(a){/^http:/i.test(a)&&window.location.protocol===\"https:\"&&(google.ml&&google.ml(Error(\"a\"),!1,{src:a,glmm:1}),a=\"\");return a}"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
#>  [3] "function r(a,b,d,c,h){var e=\"\";b.search(\"&ei=\")===-1&&(e=\"&ei=\"+n(c),b.search(\"&lei=\")===-1&&(c=p(c))&&(e+=\"&lei=\"+c));var f=b.search(\"&cshid=\")===-1&&a!==\"slh\";c=\"&zx=\"+Date.now().toString();g._cshid&&f&&(c+=\"&cshid=\"+g._cshid);(d=d())&&(c+=\"&opi=\"+d);return\"/\"+(h||\"gen_204\")+\"?atyp=i&ct=\"+String(a)+\"&cad=\"+(b+e+c)};l=google.kEI;google.getEI=n;google.getLEI=p;google.ml=function(){return null};google.log=function(a,b,d,c,h,e){e=e===void 0?k:e;d||(d=r(a,b,e,c,h));if(d=q(d)){a=new Image;var f=m.length;m[f]=a;a.onerror=a.onload=a.onabort=function(){delete m[f]};a.src=d}};google.logUrl=function(a,b){b=b===void 0?k:b;return r(\"\",a,b)};}).call(this);(function(){google.y={};google.sy={};function e(a,b,d){if(a)var c=a.id;else{do c=Math.random();while(d[c])}d[c]=[a,b]}var f;(f=google).x||(f.x=function(a,b){e(a,b,google.y)});var g;(g=google).sx||(g.sx=function(a,b){e(a,b,google.sy)});google.bx=!1;var h;(h=google).lx||(h.lx=function(){});var k=[],l;(l=google).fce||(l.fce=function(a,b,d,c){k.push([a,b,d,c])});google.qce=k;google.adl=[];}).call(this);google.f={};(function(){"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
#>  [4] "document.documentElement.addEventListener(\"submit\",function(b){var a;if(a=b.target){var c=a.getAttribute(\"data-submitfalse\");a=c===\"1\"||c===\"q\"&&!a.elements.q.value?!0:!1}else a=!1;a&&(b.preventDefault(),b.stopPropagation())},!0);document.documentElement.addEventListener(\"click\",function(b){var a;a:{for(a=b.target;a&&a!==document.documentElement;a=a.parentElement)if(a.tagName===\"A\"){a=a.getAttribute(\"data-nohref\")===\"1\";break a}a=!1}a&&b.preventDefault()},!0);}).call(this);</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
#>  [5] "</style><style>body,td,a,p,.h{font-family:sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#1967d2}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px sans-serif}.gsfs{font:17px sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}body{background:#fff;color:#1f1f1f}a{color:#681da8;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#1967d2}a:visited{color:#681da8}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#ecedee;border:solid 1px;border-color:#d2d2d2 #70757a #70757a #d2d2d2;height:30px}.lsbb{display:block}#WqQANb a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;color:#1f1f1f;border:none;cursor:pointer;height:30px;margin:0;outline:0;font:15px sans-serif;vertical-align:top}.lsb:active{background:#dadce0}.lst:focus{outline:none}</style><script nonce=\"WERd3jSj1HJrU5Zlev9A6g\">(function(){window.google.erd={jsr:1,bv:2376,de:true,dpf:'-jHAYhFsYjbK3acjw8WnLuf3J2KEOycJE81sAGNMmLw'};"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
#>  [6] "var g=this||self;var k,l=(k=g.mei)!=null?k:1,m,p=(m=g.diel)!=null?m:0,q,r=(q=g.sdo)!=null?q:!0,t=0,u,w=google.erd,x=w.jsr;google.ml=function(a,b,d,n,e){e=e===void 0?2:e;b&&(u=a&&a.message);d===void 0&&(d={});d.cad=\"ple_\"+google.ple+\".aple_\"+google.aple;if(google.dl)return google.dl(a,e,d,!0),null;b=d;if(x<0){window.console&&console.error(a,b);if(x===-2)throw a;b=!1}else b=!a||!a.message||a.message===\"Error loading script\"||t>=l&&!n?!1:!0;if(!b)return null;t++;d=d||{};b=encodeURIComponent;var c=\"/gen_204?atyp=i&ei=\"+b(google.kEI);google.kEXPI&&(c+=\"&jexpid=\"+b(google.kEXPI));c+=\"&srcpg=\"+b(google.sn)+\"&jsr=\"+b(w.jsr)+"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
#>  [7] "\"&bver=\"+b(w.bv);w.dpf&&(c+=\"&dpf=\"+b(w.dpf));var f=a.lineNumber;f!==void 0&&(c+=\"&line=\"+f);var h=a.fileName;h&&(h.indexOf(\"-extension:/\")>0&&(e=3),c+=\"&script=\"+b(h),f&&h===window.location.href&&(f=document.documentElement.outerHTML.split(\"\\n\")[f],c+=\"&cad=\"+b(f?f.substring(0,300):\"No script found.\")));google.ple&&google.ple===1&&(e=2);c+=\"&jsel=\"+e;for(var v in d)c+=\"&\",c+=b(v),c+=\"=\",c+=b(d[v]);c=c+\"&emsg=\"+b(a.name+\": \"+a.message);c=c+\"&jsst=\"+b(a.stack||\"N/A\");c.length>=12288&&(c=c.substring(0,12288));a=c;n||google.log(0,\"\",a);return a};window.onerror=function(a,b,d,n,e){u!==a&&(a=e instanceof Error?e:Error(a),d===void 0||\"lineNumber\"in a||(a.lineNumber=d),b===void 0||\"fileName\"in a||(a.fileName=b),google.ml(a,!1,void 0,!1,a.name===\"SyntaxError\"||a.message.substring(0,11)===\"SyntaxError\"||a.message.indexOf(\"Script error\")!==-1?3:p));u=null;r&&t>=l&&(window.onerror=null)};})();</script></head><body bgcolor=\"#fff\"><script nonce=\"WERd3jSj1HJrU5Zlev9A6g\">(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
#>  [8] "if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
#>  [9] "}"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
#> [10] "})();</script><div id=\"mngb\"><div id=gbar><nobr><b class=gb1>Search</b> <a class=gb1 href=\"https://www.google.com/imghp?hl=en&tab=wi\">Images</a> <a class=gb1 href=\"https://maps.google.com/maps?hl=en&tab=wl\">Maps</a> <a class=gb1 href=\"https://play.google.com/?hl=en&tab=w8\">Play</a> <a class=gb1 href=\"https://www.youtube.com/?tab=w1\">YouTube</a> <a class=gb1 href=\"https://news.google.com/?tab=wn\">News</a> <a class=gb1 href=\"https://mail.google.com/mail/?tab=wm\">Gmail</a> <a class=gb1 href=\"https://drive.google.com/?tab=wo\">Drive</a> <a class=gb1 style=\"text-decoration:none\" href=\"https://www.google.com/intl/en/about/products?tab=wh\"><u>More</u> &raquo;</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href=\"http://www.google.com/history/optout?hl=en\" class=gb4>Web History</a> | <a  href=\"/preferences?hl=en\" class=gb4>Settings</a> | <a target=_top id=gb_70 href=\"https://accounts.google.com/ServiceLogin?hl=en&passive=true&continue=https://www.google.com/&ec=GAZAAQ\" class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div></div><center><br clear=\"all\" id=\"lgpd\"><div><img alt=\"Google\" height=\"92\" src=\"/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png\" style=\"padding:28px 0 14px\" width=\"272\" id=\"hplogo\"><br><br></div><form action=\"/search\" name=\"f\"><table cellpadding=\"0\" cellspacing=\"0\"><tr valign=\"top\"><td width=\"25%\">&nbsp;</td><td align=\"center\" nowrap=\"\"><input name=\"ie\" value=\"ISO-8859-1\" type=\"hidden\"><input value=\"en\" name=\"hl\" type=\"hidden\"><input name=\"source\" type=\"hidden\" value=\"hp\"><input name=\"biw\" type=\"hidden\"><input name=\"bih\" type=\"hidden\"><div class=\"ds\" style=\"height:32px;margin:4px 0\"><input class=\"lst\" style=\"margin:0;padding:5px 8px 0 6px;vertical-align:top;color:#1f1f1f\" autocomplete=\"off\" value=\"\" title=\"Google Search\" maxlength=\"2048\" name=\"q\" size=\"57\"></div><br style=\"line-height:0\"><span class=\"ds\"><span class=\"lsbb\"><input class=\"lsb\" value=\"Google Search\" name=\"btnG\" type=\"submit\"></span></span><span class=\"ds\"><span class=\"lsbb\"><input class=\"lsb\" id=\"tsuid_qpqPaaX3E4edkPIP2_2j8Qc_1\" value=\"I'm Feeling Lucky\" name=\"btnI\" type=\"submit\"><script nonce=\"WERd3jSj1HJrU5Zlev9A6g\">(function(){var id='tsuid_qpqPaaX3E4edkPIP2_2j8Qc_1';document.getElementById(id).onclick = function(){if (this.form.q.value){this.checked = 1;if (this.form.iflsig)this.form.iflsig.disabled = false;}"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
#> [11] "else top.location='/doodles/';};})();</script><input value=\"AFdpzrgAAAAAaY-oujnU1riZSbpxtQsIliLdJcbagaqF\" name=\"iflsig\" type=\"hidden\"></span></span></td><td class=\"fl sblc\" align=\"left\" nowrap=\"\" width=\"25%\"><a href=\"/advanced_search?hl=en&amp;authuser=0\">Advanced search</a></td></tr></table><input id=\"gbv\" name=\"gbv\" type=\"hidden\" value=\"1\"><script nonce=\"WERd3jSj1HJrU5Zlev9A6g\">(function(){var a,b=\"1\";if(document&&document.getElementById)if(typeof XMLHttpRequest!=\"undefined\")b=\"2\";else if(typeof ActiveXObject!=\"undefined\"){var c,d,e=[\"MSXML2.XMLHTTP.6.0\",\"MSXML2.XMLHTTP.3.0\",\"MSXML2.XMLHTTP\",\"Microsoft.XMLHTTP\"];for(c=0;d=e[c++];)try{new ActiveXObject(d),b=\"2\"}catch(h){}}a=b;if(a==\"2\"&&location.search.indexOf(\"&gbv=2\")==-1){var f=google.gbvu,g=document.getElementById(\"gbv\");g&&(g.value=a);f&&window.setTimeout(function(){location.href=f},0)};}).call(this);</script></form><div style=\"font-size:83%;min-height:3.5em\"><br></div><span id=\"footer\"><div style=\"font-size:10pt\"><div style=\"margin:19px auto;text-align:center\" id=\"WqQANb\"><a href=\"/intl/en/ads/\">Advertising</a><a href=\"/services/\">Business Solutions</a><a href=\"/intl/en/about.html\">About Google</a></div></div><p style=\"font-size:8pt;color:#636363\">&copy; 2026 - <a href=\"/intl/en/policies/privacy/\">Privacy</a> - <a href=\"/intl/en/policies/terms/\">Terms</a></p></span></center><script nonce=\"WERd3jSj1HJrU5Zlev9A6g\">(function(){window.google.cdo={height:757,width:1440};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b){var c=window.document,d=c.compatMode==\"CSS1Compat\"?c.documentElement:c.body;a=d.clientWidth;b=d.clientHeight}if(a&&b&&(a!=google.cdo.width||b!=google.cdo.height)){var e=google,f=e.log,g=\"/client_204?&atyp=i&biw=\"+a+\"&bih=\"+b+\"&ei=\"+google.kEI,h=\"\",k=window.google&&window.google.kOPI||null;k&&(h+=\"&opi=\"+k);f.call(e,\"\",\"\",g+h)};}).call(this);})();(function(){google.xjs={basecomb:'/xjs/_/js/k\\x3dxjs.hp.en.LT6FOh2-3-c.es5.O/ck\\x3dxjs.hp.V5J8OaiTzrQ.L.X.O/am\\x3dAAIAAAAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAAICAQAAAAAAAAAAAAAAAAAAAIAAAAAAAAIBgAAAAAkAQAAAAAABAAAAIAAAAAIAAAEAACAAAABB3BAAAAABAACwCAAAAAADgBQ/d\\x3d1/ed\\x3d1/dg\\x3d0/ujg\\x3d1/rs\\x3dACT90oF7P62dRxHkBrsQYxsSNyzcqfkp_A',basecss:'/xjs/_/ss/k\\x3dxjs.hp.V5J8OaiTzrQ.L.X.O/am\\x3dAAIAAAAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAAIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAQAAAAAABAAAAIAAAAAIAAAEAACA/rs\\x3dACT90oF73YXZ_Y1WPenl_7qmyF6ldqVtTw',basejs:'/xjs/_/js/k\\x3dxjs.hp.en.LT6FOh2-3-c.es5.O/am\\x3dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAIBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABB3BAAAAABAACwCAAAAAADgBQ/dg\\x3d0/rs\\x3dACT90oH09lrFS4sQtWzAX9RKdDuMF7BltQ',excm:[]};})();(function(){var u='/xjs/_/js/k\\x3dxjs.hp.en.LT6FOh2-3-c.es5.O/am\\x3dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAIBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABB3BAAAAABAACwCAAAAAADgBQ/d\\x3d1/ed\\x3d1/dg\\x3d4/rs\\x3dACT90oH09lrFS4sQtWzAX9RKdDuMF7BltQ/m\\x3dsb_he,d';var st=1;var amd=1000;var mmd=0;var pop=true;var povp=false;var fp='';var ecb=false;var cst=false;var pxp=false;"                                       
#> [12] "var f=this||self;function g(){var a=google.ia&&google.ia.r.B2Jtyd;return a&&[1,5,6].indexOf(a.m)>=0&&a.cbfd&&a.cbvi?a:void 0};function h(a){var b=document.createElement(\"link\");b.as=\"script\";b.href=a;b.rel=\"preload\";document.body.appendChild(b)}function k(){var a=[l];google.dp||(a.forEach(h),google.dp=!0)};google.ps=google.ps||[];function m(a){var b=l,c=function(){};google.lx=google.stvsc?c:function(){n(b,a);google.lx=c};google.bx||google.lx()}function p(a,b){b&&(a.src=b);fp&&google.caft&&google.caft(function(){var e=window._ejsa;e&&e.q.some(function(d){return d.eventType===\"click\"})&&(a.fetchPriority=fp)});var c=a.onload;a.onload=function(e){c&&c(e);google.ps=google.ps.filter(function(d){return a.src!==d})};google.ps.push(a.src);document.body.appendChild(a)}"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
#> [13] "function q(a,b,c){b?requestAnimationFrame(function(){p(a,c)}):p(a,c)}google.as=p;function n(a,b){google.tick&&google.tick(\"load\",\"xjsls\");var c=document.createElement(\"script\");c.onerror=function(){google.ple=1};c.onload=function(){google.ple=0};google.xjsus=void 0;q(c,b,a);google.aple=-1;google.dp=!0};function r(){for(var a=document.getElementsByTagName(\"img\"),b=0,c=a.length;b<c;b++){var e=a[b],d;if(d=e.hasAttribute(\"data-lzy_\")&&Number(e.getAttribute(\"data-atf\"))&1)d=e.getAttribute(\"jscontroller\"),d=!((d===\"UBXHI\"||d===\"R3fhkb\"||d===\"TSZEqd\")&&e.hasAttribute(\"data-src\"));if(d)return!0}return!1};var l,t,w,x,y,z,A,B,C,D,E=\"\";function F(){l=pxp&&google.xjsup||u;var a=l.match(\"/cb=(loaded_h_\\\\d+)\");a&&a[1]&&(E=a[1]);google.xjsu=l;f._F_jsUrl=l;z=function(c){m(c)};t=!1;w=(st===1||st===3)&&!!google.caft&&!r();x=g();y=!E&&(st===2||st===3)&&!!x&&!r();if(E){var b=(st===2||st===3)&&!!x;f[E]=function(c){var e=!1,d=function(){e||(e=!0,cst?setTimeout(function(){return void c.call(window,window._)},0):c.call(window,window._))};b&&google.ia.adls?(x.cbvi.push(function(){delete google.ia.adls}),x.cbvi.push(d),setTimeout(d,mmd)):d()}}A="                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
#> [14] "pop;B=povp;C=A&&document.prerendering||B&&document.hidden;D=B?\"visibilitychange\":\"prerenderingchange\"}function G(a){t||w||y||C||(z(a),t=!0)}"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
#> [15] "setTimeout(function(){google.tick&&google.tick(\"load\",\"xjspls\");F();if(w||y||C){if(w){var a=function(){w=!1;G()};google.caft(a);setTimeout(a,amd)}y&&(a=function(){y=!1;G()},x.cbvi.push(a),setTimeout(a,mmd));if(C){var b=function(){(B?document.hidden:document.prerendering)||(C=!1,G(!B&&!0),document.removeEventListener(D,b))};document.addEventListener(D,b,{passive:!0})}t||k()}else z()},0);})();window._ = window._ || {};window._DumpException = _._DumpException = function(e){throw e;};window._s = window._s || {};_s._DumpException = _._DumpException;window._qs = window._qs || {};_qs._DumpException = _._DumpException;window.loaded_h_0 = function(cb){cb.call(window,window._);};(function(){var t=[512,0,256,0,0,0,524288,807403520,16777312,0,128,0,637534240,33272,9459208,68157568,25346048,65569,128,2097152,134234112,0,18289,268435456,142400,0,24064];window._F_toggles = window._xjs_toggles = t;})();window._F_installCss = window._F_installCss || function(css){};(function(){var pmc='{\\x22d\\x22:{},\\x22sb_he\\x22:{\\x22client\\x22:\\x22heirloom-hp\\x22,\\x22dh\\x22:true,\\x22ds\\x22:\\x22\\x22,\\x22host\\x22:\\x22google.com\\x22,\\x22jsonp\\x22:true,\\x22msgs\\x22:{\\x22cibl\\x22:\\x22Clear Search\\x22,\\x22dym\\x22:\\x22Did you mean:\\x22,\\x22lcky\\x22:\\x22I\\\\u0026#39;m Feeling Lucky\\x22,\\x22lml\\x22:\\x22Learn more\\x22,\\x22psrc\\x22:\\x22This search was removed from your \\\\u003Ca href\\x3d\\\\\\x22/history\\\\\\x22\\\\u003EWeb History\\\\u003C/a\\\\u003E\\x22,\\x22psrl\\x22:\\x22Remove\\x22,\\x22sbit\\x22:\\x22Search by image\\x22,\\x22srch\\x22:\\x22Google Search\\x22},\\x22ovr\\x22:{},\\x22pq\\x22:\\x22\\x22,\\x22rfs\\x22:[],\\x22stok\\x22:\\x22SDMKlm7GIBws37Tp7lulu3JgBBw\\x22}}';google.pmc=JSON.parse(pmc);})();</script></body></html>"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

# The default
r2 <- GET("https://www.google.com", write_memory())

# Save a very large file
if (FALSE) { # \dontrun{
GET(
  "http://www2.census.gov/acs2011_5yr/pums/csv_pus.zip",
  write_disk("csv_pus.zip"), progress()
)
} # }