loopj/android-async-http — pull request #70 by alain57 (2012-06-24 01:26:21+00:00)
Title: added an onFailure if there is a problem with the remote host or the internet connection

Hello,

I added some verifications in your project to be sure that the remote host is available ( this is not the case if you loose internet connection or if the host is really down)

that way if you send a Json request, you can catch the message in
public void onFailure(Throwable e, String errorResponse)

I also added a further check in the Jsonformat.
Indeed a valid Json should start with { or with [
It seams that this is not checked in the JSONTokener function.
if the String is not a valid json, it will return null

So i also modified the handleFailureMessage to include that case