Volley in Android
Overview Volley is a HTTP Library that is used in Android applications. It is used to make networking tasks easier and most importantly faster. With Volley all you have to do is add your request in a RequestQueue and you will get your response parsed and delivered in the form of Response Listener if everything is fine or else Response Error Listener. Steps to follow Add the following dependency def volley_version = "1.2.1" implementation " com.android.volley:volley: $volley_version " Add Internet permission in AndroidManifest.xml file < uses-permission android :name ="android.permission.INTERNET" /> For a Simple String Request class MainActivity : AppCompatActivity () { companion object { const val SERVER_URL = "https://jsonplaceholder.typicode.com/posts/1" } private lateinit var requestQueue : RequestQueue override fun onCreate ( savedInstanceState: Bundle? ) { super .onCreate ( savedInstanceState ) ...