R/pastax-package.R

Defines functions request

#' @keywords internal
"_PACKAGE"

#' @import shiny
## usethis namespace: start
#' @importFrom DT DTOutput
#' @importFrom DT renderDT
#' @importFrom fs dir_create
#' @importFrom fs dir_exists
#' @importFrom fs path
#' @importFrom glue glue
#' @importFrom here here
#' @importFrom httr2 req_perform
#' @importFrom httr2 req_url_path_append
#' @importFrom httr2 req_url_query
#' @importFrom httr2 req_user_agent
#' @importFrom httr2 resp_body_json
#' @importFrom jsonlite fromJSON
#' @importFrom jsonlite write_json
#' @importFrom polite bow
#' @importFrom polite scrape
#' @importFrom purrr map
#' @importFrom purrr map_df
#' @importFrom purrr walk
#' @importFrom readr read_csv
#' @importFrom rlang %||%
#' @importFrom rmarkdown github_document
#' @importFrom rmarkdown render
#' @importFrom rvest html_attr
#' @importFrom rvest html_element
#' @importFrom rvest html_elements
#' @importFrom rvest html_text2
#' @importFrom rvest read_html
#' @importFrom tibble tibble
## usethis namespace: end
NULL

request <- function(url, options = list()) {
  req <- httr2::request(url)
  req$options <- options
  req
}
2DegreesInvesting/pastax documentation built on Feb. 12, 2022, 7:46 a.m.