| Async {crul} | R Documentation |
A client to work with many URLs, but all with the same HTTP method
urls |
(character) one or more URLs (required) |
Methods
get(path, query, disk, stream, ...)make async GET requests for all URLs
post(path, query, body, encode, disk, stream, ...)make async POST requests for all URLs
put(path, query, body, encode, disk, stream, ...)make async PUT requests for all URLs
patch(path, query, body, encode, disk, stream, ...)make async PATCH requests for all URLs
delete(path, query, body, encode, disk, stream, ...)make async DELETE requests for all URLs
head(path, ...)make async HEAD requests for all URLs
See HttpClient() for information on parameters.
a list, with objects of class HttpResponse().
Responses are returned in the order they are passed in.
Other async: AsyncVaried
## Not run:
cc <- Async$new(
urls = c(
'https://httpbin.org/',
'https://httpbin.org/get?a=5',
'https://httpbin.org/get?foo=bar'
)
)
cc
(res <- cc$get())
res[[1]]
res[[1]]$url
res[[1]]$success()
res[[1]]$status_http()
res[[1]]$response_headers
res[[1]]$method
res[[1]]$content
res[[1]]$parse("UTF-8")
lapply(res, function(z) z$parse("UTF-8"))
## End(Not run)