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

Request: re-export curl::has_internet() or add equivalent internet check function #512

Closed
m-muecke opened this issue Aug 5, 2024 · 3 comments · Fixed by #631
Closed
Labels
feature a feature request or enhancement
Milestone

Comments

@m-muecke
Copy link
Contributor

m-muecke commented Aug 5, 2024

For testing and examples it would be great if httr2 had a function for checking internet connection, like testthat::skip_if_offline() or curl::has_internet(). Would it be perhaps possible of re-exporting the curl::has_internet() function?

@hadley hadley added the feature a feature request or enhancement label Sep 3, 2024
@hadley hadley added this to the v1.1.0 milestone Dec 19, 2024
@hadley
Copy link
Member

hadley commented Dec 24, 2024

My biggest hangup here is what to call the function — currently all httr2 functions either start with req_, resp_ or url_, but none of those feel quite right. Maybe it's ok to introduce a new prefix for just this function, but that also doesn't feel quite right.

@hadley
Copy link
Member

hadley commented Dec 24, 2024

Hmmm, if we implement #435 this could be host_online().

@hadley
Copy link
Member

hadley commented Jan 6, 2025

Hmmm, looking at curl::has_internet() more closely I'm pretty sure that we want to use its behaviour, rather than testthat:::has_internet(). But maybe it's ok to have httr2::is_online()

hadley added a commit that referenced this issue Jan 6, 2025
hadley added a commit that referenced this issue Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants