Skip to content

Instantly share code, notes, and snippets.

@onliniak
Last active January 14, 2020 20:37
Show Gist options
  • Save onliniak/96faa1815ea2f6a3daa7da926503cc86 to your computer and use it in GitHub Desktop.
Save onliniak/96faa1815ea2f6a3daa7da926503cc86 to your computer and use it in GitHub Desktop.
GET HTTP request in Kotlin Android
import java.net.URL
import java.lang.Thread as Thread1
Thread1 {
var a = URL("http://hmkcode-api.appspot.com/rest/api/hello/Android").readText()
runOnUiThread {
textView4.text = a
}
}.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment