In B4A I used Response.ErrorResponse to get Error response. I didn't find this method in B4i implementation and tried to find an alternative. Could I use Response.GetString instead of Response.ErrorResponse ?
B4X:
Sub hc_ResponseError (Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
Log("Error response: " & Response.GetString & ", status code: " & StatusCode)
CompleteJob(TaskId, False, Reason, Null)
End Sub
B4X:
/**
* Returns a the server response as a string using UTF8 encoding.
*This method is only valid inside the ResponseSuccess event.
*/
- (NSString *)GetString;