Search code examples
androidhttprestloopj

Getting HTTP response code using Android Asynchronous Http Client (Loopj)


I'm using loopj to talk to a rest server which has different HTTP response codes for specific successful responses (i.e 200, 202). The AsyncHttpResponseHandler has an onSuccess(String content) callback but nothing that returns the HTTP response code. How can I get this?


Solution

  • Try

    @Override    
    public void onSuccess(int statusCode, String content) {
    }