Here’s a concrete example. How would I implement ...
# kotlin-fuel
j
Here’s a concrete example. How would I implement this to make it return something:
Copy code
fun getAThing(): String {
    val request: Request = Fuel.get("<http://httpbin.org/get>").responseString { request, response, result ->
        //do something with response
        result.fold({ d ->
            val endResult = d  // how do I return this from the function?
        }, { err ->
            //do something with error
        })
    }
    return ???
}