geetha.gubendran
12/20/2015, 2:13 AMgeetha.gubendran
12/20/2015, 2:14 AMkittinunf
12/20/2015, 5:02 AMresponse
object. Specifically, it is response.httpStatusCode
geetha.gubendran
12/20/2015, 9:18 AMkittinunf
12/20/2015, 10:10 AMkittinunf
12/22/2015, 2:59 PMResult
instead of Either
should make Result (pun intended) more intuitive. Also Kotlin beta 3 is supported.bmsantos
12/24/2015, 4:47 AMkittinunf
12/24/2015, 4:48 AMbmsantos
12/24/2015, 7:33 PMkittinunf
12/25/2015, 3:35 AMjkwatson
12/30/2015, 11:33 PMresponseObject
) not return the actual object that is the result of the call? Also, what are the thoughts on how to mock/stub Fuel calls so that unit tests can be written for classes/functions that need to make http calls?jkwatson
12/30/2015, 11:42 PMyoavst
12/31/2015, 5:11 AMyoavst
12/31/2015, 5:14 AMheaders(...)
before responseX
.yoavst
12/31/2015, 5:15 AMjkwatson
12/31/2015, 5:23 AMresponseObject
method? Does that require some wrapping as well?kittinunf
12/31/2015, 7:45 AMResult<T, FuelError>
. Can you decompose it with val (data, error) = result
?kittinunf
12/31/2015, 7:45 AM… .responseObject(deserializer()) { request, response, result ->
val (data, error) = result
}
mplatvoet
12/31/2015, 8:47 AMlateinit
? For instance the Response
class has lateinit var url
mplatvoet
12/31/2015, 8:51 AMyoavst
12/31/2015, 12:56 PMjkwatson
12/31/2015, 3:49 PMjkwatson
12/31/2015, 3:55 PMyoavst
12/31/2015, 6:41 PMjkwatson
12/31/2015, 9:37 PMresponseObject
and then assign to it inside the callback function. That seems really kludgy, though.jkwatson
01/01/2016, 12:13 AMfun 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 ???
}
yoavst
01/01/2016, 5:15 AMjkwatson
01/01/2016, 5:19 AMyoavst
01/01/2016, 10:47 AMkittinunf
01/01/2016, 2:30 PM