read_get <- function(url){
require(httr)
# Check Proxy
if(!exists("proxy_user")) proxy_user <<- get_proxy_user()
if(is.na(proxy_user[1])) stop("Proxy user for authentication missing!")
# Set Proxy
httr::set_config(
httr::use_proxy(url = get_proxy(), username=proxy_user[1],password = proxy_user[2] , auth="any"),
override = TRUE
)
# Retrieve data
result <- httr::GET(url)
json <- httr::content(result, as="text", encoding = "UTF-8")
# Return
return(json)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.