Here's what I have ``` val queue = Volley.newReque...
# android
d
Here's what I have
Copy code
val queue = Volley.newRequestQueue(this)
                val url = "<https://api.fortnitetracker.com/v1/profile/${platformText}/${usernameText}>"
                val stringRequest = StringRequest(Request.Method.GET, url,
                        Response.Listener<String> {
                            response -> println(response)
                        },
                        Response.ErrorListener {
                            println("Request didn't work")
                        }) 
                queue.add(stringRequest)
j
I haven’t used Volley, but have you tried https://stackoverflow.com/questions/17049473/how-to-set-custom-header-in-volley-request aka the first result from google search?
d
I've looked at it, but I don't know how to do it in Kotlin
j
methods and data types are the same, where is the problem?
g
Just copy paste Java code to Kotlin, Kotlin Plugin will convert it for you automatically
d
Oh I just did that and it got something working for me, I'll let you guys know how it goes, thanks!