response Data

fun <T> JsonHelper.responseData(): T

Extension function to get directly the response data from the request response

No-any params required

Return

the RESPONSE_DATA_KEY value as String

Example

  • The complete response

{
"response": "Response data", // in the example is String, but with any types is the same workflow
"status": "SUCCESSFUL"
}
requester.sendRequest(
request = {
// make a request
},
onResponse = { response ->
val data: Any = response.responseData()
println(data) // will be printed Response data
}
)