I'm fetching data from a server using an API, my R-script has 4 code sections.
Section I
new_export_url<-KoboconnectR::kobo_export_create(url=serverURL, uname=username, pwd=password,
assetid=id, type= "csv", all="false", lang="_default",
hierarchy="false", include_grp="true",grp_sep="/")
Section II
Raw.CEP <- httr::GET(new_export_url, httr::authenticate(user =username, password =password))
Raw.Data <- read.csv(text = httr::content(Raw.CEP, type = "text", encoding = "UTF-8"), sep = ";")
When I run the code separately, i.e. Section I first then Section II later, the data successfully downloads to the RStudio workspace. However, When I click the button run to run the whole script at once, the data download times out (?) and I get the following error in the console.
What could be the issue?