req_progress: Add a progress bar to long downloads or uploads

View source: R/progress.R

req_progressR 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)

httr2 documentation built on Nov. 14, 2023, 5:08 p.m.