tryGet

suspend fun tryGet(apiPath: String, headers: Map<String, Any>? = FetchDefaults.Headers, redirect: RequestRedirect? = FetchDefaults.Redirect, abortController: AbortController? = null): ByteArray?(source)

Deprecated

DO NOT IGNORE. Please change to `tryGetBytes` instead. This method will be modified soon in a backwards incompatible way, in order to support additional cases that the current form doesn't support.

Replace with

tryGetBytes(apiPath, headers, redirect, abortController)

Like get, but returns null if the request failed for any reason.

Additionally, if logOnError is set to true, any failure will be logged to the console. By default, this will be true for debug builds and false for release builds.