Skip to content

Instantly share code, notes, and snippets.

@alekrutkowski
Created May 6, 2024 07:18
Show Gist options
  • Save alekrutkowski/e597fff034d422c39cadd3c5d432dd22 to your computer and use it in GitHub Desktop.
Save alekrutkowski/e597fff034d422c39cadd3c5d432dd22 to your computer and use it in GitHub Desktop.
`download.file` function compatible with webR (CORS)
webR.download.file <- function(url, destfile)
download.file(paste0("https://corsproxy.io/?",URLencode(url)),
destfile)
# See https://github.com/r-wasm/webr/issues/252#issuecomment-1690142510
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment