kittinunf
03/06/2016, 2:52 AMmplatvoet
03/06/2016, 7:22 AMyoavst
03/08/2016, 6:00 AMFuelError
is thrown during async request? how does it return the Response object?yoavst
03/08/2016, 6:00 AMyoavst
03/08/2016, 6:18 AMyoavst
03/08/2016, 3:13 PMtoAsciiString()
denis.st
03/17/2016, 9:37 PM//if you have body to post it manually
<http://Fuel.post|Fuel.post>("<http://httpbin.org/post>").body("{ \"foo\" : \"bar\" }").response { request, response, result ->
}
For such a body there should be a correct Content-Type
specified. Something like application/json
. But for the case like in the example I getting Content-Type: application/x-www-form-urlencoded; charset=utf-8
kittinunf
03/18/2016, 3:57 AMapplication/json
doesn’t add by default.kittinunf
03/18/2016, 3:58 AMContent-Type
by using header
method.denis.st
03/18/2016, 8:34 AMdenis.st
03/18/2016, 8:36 AMprivate var pollingRequest: Request? = null
private fun cancelPollRequest() {
val r = pollingRequest
if (r != null) {
this.pollingRequest = null
r.cancel()
}
}
pollingRequest
is a long-polling request, which remains active even after this canceldenis.st
03/18/2016, 8:37 AMkittinunf
03/18/2016, 9:01 AMkittinunf
03/18/2016, 9:01 AMdenis.st
03/18/2016, 9:28 AMdenis.st
03/18/2016, 9:28 AMkittinunf
03/18/2016, 9:31 AMkittinunf
03/18/2016, 9:32 AMdenis.st
03/18/2016, 9:37 AMFuture.cancel
is not enough to cancel the execution. It won't terminate neither http-request, nor underlying thread. So it's up to the developer to forward the cancellation intent to the HttpClient/HttpUrlConnection.
I'm not quite experienced in this though simple smilekittinunf
03/18/2016, 9:50 AMmplatvoet
03/18/2016, 8:32 PMyoavst
03/18/2016, 8:37 PMorangy
flamurey
04/24/2016, 7:10 PMcarmas123
04/27/2016, 7:29 PMcarmas123
04/27/2016, 7:29 PMkittinunf
04/28/2016, 2:46 AMcarmas123
04/28/2016, 9:07 AMcarmas123
04/28/2016, 9:07 AMcarmas123
04/28/2016, 9:28 AM