<I want to make an app that sends an http request ...
# stackoverflow
r
I want to make an app that sends an http request with a button press and it doesn't work i am using okhttp3 to send the request and it just WORKS once and any other button press just does nothing private fun makeGetRequest() { val client = OkHttpClient() val request = Request.Builder().url("http://192.168.1.54/trigger").build() val textView = findViewById(R.id.textView) client.newCall(request).enqueue(object : okhttp3.Callback { override fun onFailure(call: Call, e: IOException) { runOnUiThread {...