I am extremely new to Kotlin and APIs in general and can\'t find the syntax to create an API request using this language. I am creating a mobile version of a website so I\'m usi
you can use Retrofit
or AsyncTask
, example of AsyncTask
:
class getData() : AsyncTask() {
override fun doInBackground(vararg params: Void?): String? {
}
override fun onPreExecute() {
super.onPreExecute()
}
override fun onPostExecute(result: String?) {
super.onPostExecute(result)
}
}
for Retrofit
check this awsome tutorial