Previously, used paste0() to compose the URL: base URL + path. When the URL contained a / at the end, the request URL was mal-formed--in particular, it had an extra / in the path. To address this, use httr::modify_url() which is to URLs what fs::path() is to file paths--meaning it correctly "concatenates" components of a path.
Previously, used
paste0()
to compose the URL: base URL + path. When the URL contained a/
at the end, the request URL was mal-formed--in particular, it had an extra/
in the path. To address this, usehttr::modify_url()
which is to URLs whatfs::path()
is to file paths--meaning it correctly "concatenates" components of a path.