debugging to api callbacks
This commit is contained in:
parent
5d7dd31354
commit
a0ba813d5f
2 changed files with 2 additions and 1 deletions
|
@ -41,6 +41,7 @@ class InstancesUrlRequestCallback(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSucceeded(request: UrlRequest?, info: UrlResponseInfo?) {
|
override fun onSucceeded(request: UrlRequest?, info: UrlResponseInfo?) {
|
||||||
|
println(stringResponse) // TODO don't do that
|
||||||
if (info?.httpStatusCode == 200) {
|
if (info?.httpStatusCode == 200) {
|
||||||
val jsonResponse = JSONObject(stringResponse.toString())
|
val jsonResponse = JSONObject(stringResponse.toString())
|
||||||
val instances = ArrayList<Instance>()
|
val instances = ArrayList<Instance>()
|
||||||
|
|
|
@ -41,9 +41,9 @@ class UserUrlRequestCallback(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSucceeded(request: UrlRequest?, info: UrlResponseInfo?) {
|
override fun onSucceeded(request: UrlRequest?, info: UrlResponseInfo?) {
|
||||||
|
println(stringResponse) // TODO don't do that
|
||||||
if (info?.httpStatusCode == 200) {
|
if (info?.httpStatusCode == 200) {
|
||||||
val jsonResponse = JSONObject(stringResponse.toString())
|
val jsonResponse = JSONObject(stringResponse.toString())
|
||||||
println(jsonResponse)
|
|
||||||
onSuccess(User(
|
onSuccess(User(
|
||||||
id = jsonResponse.getString("id"),
|
id = jsonResponse.getString("id"),
|
||||||
username = jsonResponse.getString("username"),
|
username = jsonResponse.getString("username"),
|
||||||
|
|
Loading…
Reference in a new issue