You should only need `config()` not `httr::config()`.  If that doesn't work, just default to NULL and call `config()` inside the function.