URL internalURL = new URL(url) return internalURL.openConnection().inputStream.withCloseable { it.bytes.encodeBase64(); }