kittinunf
10/07/2015, 5:09 AMkittinunf
10/07/2015, 5:10 AMgeetha.gubendran
10/07/2015, 5:10 AMkittinunf
10/07/2015, 5:11 AMmplatvoet
10/07/2015, 5:12 AM<http://Fuel.post|Fuel.post>(Utils.getRootURL() + "/user", listOf(...) .response {
request, response, either ->
when (either) {
is Either.Left -> {
Log.d(TAG, "Error String")
}
is Either.Right -> {
Log.d(TAG, response.toString())
}
}
}
geetha.gubendran
10/07/2015, 5:13 AMgeetha.gubendran
10/07/2015, 5:13 AMgeetha.gubendran
10/07/2015, 5:13 AMgeetha.gubendran
10/07/2015, 5:15 AMgeetha.gubendran
10/07/2015, 5:19 AMkittinunf
10/07/2015, 5:21 AMkittinunf
10/07/2015, 5:26 AMkittinunf
10/07/2015, 5:26 AM<http://Fuel.post|Fuel.post>("<http://jsonplaceholder.typicode.com/posts>", listOf("email" to "xxx",
"password" to "yyy",
"firstName" to "hello",
"lastName" to "world",
"date" to "10/05/1988")).responseString { request, response, either ->
val (err, data) = either
if (err != null) {
Log.e(TAG, err.toString())
} else {
Log.d(TAG, data)
}
}
kittinunf
10/07/2015, 5:27 AMkittinunf
10/07/2015, 5:34 AM--> POST (<http://jsonplaceholder.typicode.com/posts>)
Main: Body : key=value&email=xxx&password=yyy&firstName=hello&lastName=world&date=10%2F05%2F1988
Main: Headers : (3)
Main: Accept-Encoding : compress;q=0.5, gzip;q=1.0
Main: Device : Android
Main: Content-Type : application/x-www-form-urlencoded
itnoles
08/04/2019, 1:27 AMitnoles
08/05/2019, 6:58 PMDerk-Jan Karrenbeld
08/06/2019, 5:16 PMAccept
header to for example JSON
(i don't know what you expect back) application/json
It kinda looks like some binary format.Nikky
08/09/2019, 10:56 AMType!
as a hint, i am not sure where the difference isitnoles
08/15/2019, 5:44 AMRobert Jaros
08/21/2019, 8:12 PMkittinunf
02/17/2020, 3:57 AMitnoles
07/09/2020, 3:41 AMitnoles
07/31/2020, 5:17 AMBrett Best
09/24/2020, 5:46 AMLeoColman
10/27/2020, 7:34 PMrequest, response, result
stuff and go directly to the result part?Ncrnomarkovic
11/24/2020, 7:17 PMpgreze
02/04/2021, 6:51 AMOutOfMemoryError: Java heap space
I’m facing.
I’m trying to download a file and write its content in a file like that:
val result = location.httpGet().response()
destination.writeBytes(result.third.get())
Is there some built-in helper in order to help avoiding memory issues?
thx in advance 🙏Emil Kantis
02/04/2021, 8:18 AMurl.httpPost()
for instance, but I would like to somehow validate the requests that are madeitnoles
12/15/2022, 4:10 AM