January 2018
Intermediate to advanced
434 pages
14h 1m
English
Let's take look at the following steps required to make network requests in Kotlin:
var response= URL("<url>").readText()
This will just return the response fetched from the network request that you made. You just need to provide your URL as the parameter.
While using this on Android, ensure that you have pushed this task in the background, or else you will get a NetworkOnMainThread exception.
Read now
Unlock full access