http_get: Run HTTP GET request

View source: R/helpers.R

http_getR Documentation

Run HTTP GET request

Description

Run HTTP GET request

Usage

http_get(url, as = NULL, file_name = NULL)

Arguments

url

the url

as

text/NULL, return as text or as is

file_name

the file name used to cache download

Value

a didor_http_response with two fields:

  • parsed content with the as parameter

  • headers

Examples

result <- http_get(
  "https://data.statistiques.developpement-durable.gouv.fr/dido/api/v1/datasets?page=1&pageSize=10",
  as = "text"
)

MTES-MCT/didor documentation built on April 7, 2023, 7:42 a.m.