req_progress {httr2} | R Documentation |
Add a progress bar to long downloads or uploads
Description
When uploading or downloading a large file, it's often useful to provide a progress bar so that you know how long you have to wait.
Usage
req_progress(req, type = c("down", "up"))
Arguments
req |
A request. |
type |
Type of progress to display: either number of bytes uploaded or downloaded. |
Examples
req <- request("https://r4ds.s3.us-west-2.amazonaws.com/seattle-library-checkouts.csv") |>
req_progress()
## Not run:
path <- tempfile()
req |> req_perform(path = path)
## End(Not run)
[Package httr2 version 1.0.2 Index]