Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

doHttrRequest

Get URL content based on if its Shiny or local


Description

This changes the auth type depending on if its local or on Shiny

Usage

doHttrRequest(
  url,
  shiny_access_token = NULL,
  request_type = "GET",
  the_body = NULL,
  customConfig = NULL,
  simplifyVector = getOption("googleAuthR.jsonlite.simplifyVector")
)

Arguments

url

the url of the page to retrieve

request_type

the type of httr request function: GET, POST, PUT, DELETE etc.

the_body

body of POST request

customConfig

list of httr options such as httr::use_proxy or httr::add_headers that will be added to the request.

simplifyVector

Passed to jsonlite::fromJSON

session

a shiny session object if in a shiny app.

params

A named character vector of other parameters to add to request.

Details

Example of params: c(param1="foo", param2="bar")


googleAuthR

Authenticate and Create Google APIs

v1.4.0
MIT + file LICENSE
Authors
Mark Edmondson [aut, cre] (<https://orcid.org/0000-0002-8434-3881>), Jennifer Bryan [ctb], Johann deBoer [ctb], Neal Richardson [ctb], David Kulp [ctb], Joe Cheng [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.