get_content_length: Get the content length of a file to download

View source: R/api.R

get_content_lengthR Documentation

Get the content length of a file to download

Description

This function retrieves the content length of a file to be downloaded from the API.

Usage

get_content_length(api, file_to_download)

Arguments

api

An endpoint to the dataset variants.

file_to_download

A character vector of file names to download.

Value

An integer vector of content lengths, named by the file names.

Examples

api <- get_topic("Postal")
files <- get_latest_files(api)$csv
purrr::map(
  files,
  get_content_length,
  api = api) |>
  tibble::as_tibble()

eudata documentation built on Aug. 8, 2025, 7:22 p.m.