Post Title

Day 2 : Kotlin Api Call using Volley

Posted on Feb 21, 2019

Tagged with

Api call using Volley is very much easier. Yes, code is drastically reduced here

Just add the dependency

implementation '' // migrating to implementation is important

And here we do the GET Method

val queue = Volley.newRequestQueue(this);
val stringRequest = StringRequest(Request.Method.GET, "",
    Response.Listener<String> { response ->
        Toast.makeText(this@LoginActivity, response, Toast.LENGTH_SHORT).show();
    Response.ErrorListener {
        Toast.makeText(this@LoginActivity, "Error in API Request", Toast.LENGTH_SHORT).show();

And this makes entire process easy !! 

Search Blog
Side Widget
You can put anything you want inside of these side widgets. They are easy to use, and feature the new Bootstrap 4 card containers!