Learn R Programming

epidatr (version 1.2.0)

do_request: performs the request

Description

You can test the authentication headers like so:

Usage

do_request(url, params, timeout_seconds)

Arguments

Examples

Run this code
if (FALSE) {
response <- httr::RETRY(
  "GET", "https://httpbin.org/headers",
  httr::authenticate("epidata", "fake_key")
)
content(response)$headers$Authorization == paste0(
  "Basic ",
  base64enc::base64encode(charToRaw("epidata:fake_key"))
)
}

Run the code above in your browser using DataLab