# NOT RUN {
## Use the URL that returns first
afun <- function() {
u1 <- http_get("https://eu.httpbin.org")
u2 <- http_get("https://eu.httpbin.org/get")
when_any(u1, u2)$then(function(x) x$url)
}
synchronise(afun())
# }
Run the code above in your browser using DataLab