Low-level function that sends a request to any FRED API endpoint and
returns the parsed JSON as a list. Most users should use the higher-level
functions such as fred_series() or fred_search().
See also
Other configuration:
clear_cache(),
fred_cache_info(),
fred_get_key(),
fred_set_key()
Examples
# \donttest{
op <- options(fred.cache_dir = tempdir())
fred_request("series", series_id = "GDP")
#> Error in fred_get_key(): No FRED API key found.
#> ℹ Set one with `fred_set_key()` or the `FRED_API_KEY` environment variable.
#> ℹ Register for a free key at <https://fredaccount.stlouisfed.org/apikeys>.
options(op)
# }