use httpclient.getHttpClient

This commit is contained in:
greenart7c3
2023-05-10 14:47:46 -03:00
parent 7ff408bfb9
commit ee4c54aa27
@@ -4,13 +4,13 @@ import android.util.Log
import com.vitorpamplona.amethyst.AccountInfo import com.vitorpamplona.amethyst.AccountInfo
import com.vitorpamplona.amethyst.BuildConfig import com.vitorpamplona.amethyst.BuildConfig
import com.vitorpamplona.amethyst.LocalPreferences import com.vitorpamplona.amethyst.LocalPreferences
import com.vitorpamplona.amethyst.service.HttpClient
import com.vitorpamplona.amethyst.service.model.RelayAuthEvent import com.vitorpamplona.amethyst.service.model.RelayAuthEvent
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import okhttp3.MediaType.Companion.toMediaType import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import okhttp3.Request import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.RequestBody.Companion.toRequestBody
@@ -54,7 +54,7 @@ class RegisterAccounts(
.post(body) .post(body)
.build() .build()
val client = OkHttpClient.Builder().build() val client = HttpClient.getHttpClient()
client.newCall(request).execute() client.newCall(request).execute()
} catch (e: java.lang.Exception) { } catch (e: java.lang.Exception) {