| do_request | R Documentation |
Handles authentication, retries, 414 URI Too Long fallback to POST, HTTP errors, and API-level errors. The API returns errors as JSON regardless of the requested format, so for non-classic formats we sniff the body for a JSON error response.
do_request(
epidata_call,
format_type = c("json", "csv", "classic"),
timeout_seconds,
fields,
http_method = c("GET", "POST")
)
epidata_call |
an instance of |
format_type |
format to request, one of "json", "csv", "classic" |
timeout_seconds |
the maximum time to wait for a response |
fields |
fields to include in the response, or NULL for all |
http_method |
HTTP method to use |
an httr2_response object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.