Created
November 20, 2017 11:41
-
-
Save mridah/7985d5beb0056849858d9a657eebbb75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mridulahuja.appname; | |
import android.util.Log; | |
import com.loopj.android.http.JsonHttpResponseHandler; | |
import org.json.JSONObject; | |
import cz.msebera.android.httpclient.Header; | |
/** | |
* Created by mridul ahuja on 20/11/17. | |
*/ | |
public class TokenHttpResponseHandler extends JsonHttpResponseHandler{ | |
@Override | |
public void onSuccess(int statusCode, Header[] headers, JSONObject response) { | |
//super.onSuccess(statusCode, headers, response); | |
Log.i(">>>>>>>>>>>","here"); | |
if(statusCode == 401) { | |
Log.i(">>>>>>>>>>>","unauth"); | |
} | |
} | |
@Override | |
public void onFailure(int statusCode, Header[] headers, Throwable e, JSONObject errorResponse) { | |
// super.onFailure(statusCode, headers, e, errorResponse); | |
Log.i(">>>>>>>>>>>","fail"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment