I'm trying to make a get request to an API that returns a JSON array on android studio but when I check the logs it says that there was a problem... (I use kotlin by the way)
What did I do wrong?
here is my code:
val url = "http://example.com"
val queue = Volley.newRequestQueue(context)
val jsonArrayRequest = JsonArrayRequest(Request.Method.GET, url, null,
{
Log.d("notification", "successful request!")
},
{
Log.d("notification", "error on request...")
})
queue.add(jsonArrayRequest)
}