suspend fun downloadWithCredentials()

in src/main/kotlin/circlet/cli/confluence/ConfluenceClient.kt [39:49]


    suspend fun downloadWithCredentials(url: String, path: Path) {
        val response = httpClient.get(
            url,
            block = {
                credentials?.let {
                    header(HttpHeaders.Authorization, it.renderHeader())
                }
            }
        )
        response.bodyAsChannel().copyAndClose(path.toFile().writeChannel())
    }