tryPost

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

Like post, 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.