File: req_progress.Rd

package info (click to toggle)
r-cran-httr2 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,684 kB
  • sloc: sh: 13; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 709 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/req-progress.R
\name{req_progress}
\alias{req_progress}
\title{Add a progress bar to long downloads or uploads}
\usage{
req_progress(req, type = c("down", "up"))
}
\arguments{
\item{req}{A \link{request}.}

\item{type}{Type of progress to display: either number of bytes uploaded
or downloaded.}
}
\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.
}
\examples{
req <- request("https://r4ds.s3.us-west-2.amazonaws.com/seattle-library-checkouts.csv") |>
  req_progress()

\dontrun{
path <- tempfile()
req |> req_perform(path = path)
}
}