Skip to content

Commit fe12fde

Browse files
authored
Merge pull request #11 from qupath/scripts
Adapted sample scripts to new code
2 parents 1e8e488 + 1592e9b commit fe12fde

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sample-scripts/open_server.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import qupath.lib.images.servers.*
88

99
// Create a connection to an OMERO server
1010
def serverURL = "https://idr.openmicroscopy.org/"
11-
def client = WebClients.createClient(serverURL).get()
11+
def authentication = WebClient.Authentication.TRY_TO_SKIP // try to skip authentication if the server allows it. Can be
12+
// WebClient.Authentication.ENFORCE to enforce authentication or
13+
// WebClient.Authentication.SKIP to skip authentication (even if the server doesn't allow it)
14+
def client = WebClients.createClient(serverURL, authentication).get()
1215

1316
// List projects of the OMERO server
1417
def projects = client.getApisHandler().getProjects().get()

0 commit comments

Comments
 (0)