From c8e43bdad60d26a201f99d013857ffdf4a1892ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Mon, 10 Aug 2026 14:15:08 +0200 Subject: [PATCH] Create `GetUrlResolver` interface Implementations should just perform a GET request and return the raw body as bytes --- .../libraries/matrix/api/GetUrlResolver.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/GetUrlResolver.kt diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/GetUrlResolver.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/GetUrlResolver.kt new file mode 100644 index 0000000000..085aeff02f --- /dev/null +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/GetUrlResolver.kt @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2026 Element Creations Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial. + * Please see LICENSE files in the repository root for full details. + */ + +package io.element.android.libraries.matrix.api + +fun interface GetUrlResolver { + /** + * Execute generic GET requests through the SDKs internal HTTP client. + */ + suspend fun getUrl(url: String): Result +}