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

Extract out validateConnectUrl() #746

Merged
merged 4 commits into from Mar 8, 2023
Merged

Extract out validateConnectUrl() #746

merged 4 commits into from Mar 8, 2023

Conversation

hadley
Copy link
Member

@hadley hadley commented Mar 8, 2023

  • Test it and resolve problem with posit.cloud
  • Use it in addServer()
  • Add new addTestServer()

* Test it and resolve problem with posit.cloud
* Use it in `addServer()`
* Add new `addTestServer()`
Copy link
Contributor

@aronatkins aronatkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When validating (with the new flag), addServer writes the record twice.

@@ -9,6 +9,20 @@
# the URL may be specified with or without the protocol and port; this function
# will try both http and https and follow any redirects given by the server.
validateServerUrl <- function(url, certificate = NULL) {

valid <- validateConnectUrl(url, certificate)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we document that this function has a side-effect of registering a server if it discovers that the input URL can be transformed into a valid server?

R/servers.R Show resolved Hide resolved
@hadley hadley merged commit 1fbe716 into main Mar 8, 2023
10 checks passed
@hadley hadley deleted the validateConnectServer branch March 8, 2023 18:57
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

Successfully merging this pull request may close these issues.

None yet

2 participants