Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify_url() cannot handle API versioning #744

Closed
cole-johanson opened this issue Aug 9, 2023 · 1 comment
Closed

modify_url() cannot handle API versioning #744

cole-johanson opened this issue Aug 9, 2023 · 1 comment

Comments

@cole-johanson
Copy link

Does modify_url() need a version argument? The use of modify_url() is considered best practice per the API Best Practices vignette. However, it does not seem to be able to handle a version in its url argument.

If I am missing something, perhaps this issue could be used for better modify_url documentation. Thanks!

# The intent: This strips the versioning
url = httr::modify_url("https://api.smartsheet.com/2.0/", path = paste0("sheets"))
url
#> [1] "https://api.smartsheet.com/sheets"

# The workaround
url = httr::modify_url("https://api.smartsheet.com/", path = paste0('2.0/',"sheets"))
url
#> [1] "https://api.smartsheet.com/2.0/sheets"

Created on 2023-08-09 with reprex v2.0.2

@hadley
Copy link
Member

hadley commented Oct 31, 2023

httr has been superseded in favour of httr2, so is no longer under active development. If this problem is still important to your in httr2, I'd suggest filing an issue offer there 😄

@hadley hadley closed this as completed Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants