com.loopj.android.http.TextHttpResponseHandler Java Examples

The following examples show how to use com.loopj.android.http.TextHttpResponseHandler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AuthApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void signOut(TextHttpResponseHandler responseHandler) {
    String url = BaseClient.URL_POST_SIGN_OUT;
    String token = AppContext.getInstance().getToken();
    RequestParams params = new RequestParams();
    params.put("token", token);
    BaseClient.post(url, params, responseHandler);
}
 
Example #2
Source File: StatueApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void getMyStatues(String page, TextHttpResponseHandler responseHandler) {
    String token = AppContext.getInstance().getToken();
    String url = BaseClient.URL_GET_MY_STATUES + page;
    RequestParams params = new RequestParams();
    params.put("token", token);
    BaseClient.get(url, params, responseHandler);
}
 
Example #3
Source File: StatueApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void getUserStatues(String id,String page, TextHttpResponseHandler responseHandler) {
    String token = AppContext.getInstance().getToken();
    String url = BaseClient.URL_GET_USER_STATUES + page;
    RequestParams params = new RequestParams();
    params.put("token", token);
    params.put("user_id",id);
    BaseClient.get(url, params, responseHandler);
}
 
Example #4
Source File: StatueApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void getMyGuess(String type, String page, TextHttpResponseHandler responseHandler) {
    String token = AppContext.getInstance().getToken();
    String url = BaseClient.URL_GET_MY_GUESS + type + "/" + page;
    RequestParams params = new RequestParams();
    params.put("token", token);
    BaseClient.get(url, params, responseHandler);
}
 
Example #5
Source File: StatueApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void getOssToken(TextHttpResponseHandler responseHandler) {
    String token = AppContext.getInstance().getToken();
    String url = BaseClient.URL_GET_OSS;
    RequestParams params = new RequestParams();
    params.put("token", token);
    BaseClient.get(url, params, responseHandler);
}
 
Example #6
Source File: StatueApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void postDeleteStatue(String id, TextHttpResponseHandler responseHandler) {
    String token = AppContext.getInstance().getToken();
    String url = BaseClient.URL_POST_DELETE_STATUE;
    RequestParams params = new RequestParams();
    params.put("token", token);
    params.put("id", id);
    BaseClient.post(url, params, responseHandler);
}
 
Example #7
Source File: StatueApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void postReport(String id, TextHttpResponseHandler responseHandler) {
    String token = AppContext.getInstance().getToken();
    String url = BaseClient.URL_POST_REPORT;
    RequestParams params = new RequestParams();
    params.put("token", token);
    params.put("sid", id);
    BaseClient.post(url, params, responseHandler);
}
 
Example #8
Source File: StatueApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void postCreateStatue(String text, String img_path, String lng, String lat, TextHttpResponseHandler responseHandler) {
    String token = AppContext.getInstance().getToken();
    String url = BaseClient.URL_POST_CREATE_STATUE;
    RequestParams params = new RequestParams();
    params.put("token", token);
    params.put("text", text);
    params.put("img_path", img_path);
    params.put("lng", lng);
    params.put("lat", lat);
    BaseClient.post(url, params, responseHandler);
}
 
Example #9
Source File: StatueApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void postGuess(String sid, String uid, TextHttpResponseHandler responseHandler) {
    String token = AppContext.getInstance().getToken();
    String url = BaseClient.URL_POST_GUESS;
    RequestParams params = new RequestParams();
    params.put("token", token);
    params.put("sid", sid);
    params.put("uid", uid);
    BaseClient.post(url, params, responseHandler);
}
 
Example #10
Source File: StatueApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void getStatue(double lng, double lat, TextHttpResponseHandler responseHandler) {
    String token = AppContext.getInstance().getToken();
    String url = BaseClient.URL_GET_STATUE;
    RequestParams params = new RequestParams();
    params.put("token", token);
    params.put("lng", lng);
    params.put("lat", lat);
    BaseClient.get(url, params, responseHandler);
}
 
Example #11
Source File: AuthApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void contacts(TextHttpResponseHandler responseHandler) {
    String url = BaseClient.URL_GET_CONTACTS;
    String token = AppContext.getInstance().getToken();
    RequestParams params = new RequestParams();
    params.put("token", token);
    BaseClient.get(url, params, responseHandler);
}
 
Example #12
Source File: AuthApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void postAvatar(String avatar, TextHttpResponseHandler responseHandler) {
    String url = BaseClient.URL_POST_AVATAR;
    String token = AppContext.getInstance().getToken();
    RequestParams params = new RequestParams();
    params.put("token", token);
    params.put("postAvatar", avatar);
    BaseClient.post(url, params, responseHandler);
}
 
Example #13
Source File: AuthApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void changePwd(String password, TextHttpResponseHandler responseHandler) {
    String url = BaseClient.URL_POST_CHANGE_PWD;
    String token = AppContext.getInstance().getToken();
    RequestParams params = new RequestParams();
    params.put("token", token);
    params.put("password", password);
    BaseClient.post(url, params, responseHandler);
}
 
Example #14
Source File: AuthApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void changePorfile(String name, String avatar, TextHttpResponseHandler responseHandler) {
    String url = BaseClient.URL_POST_CHANGE_PROFILE;
    String token = AppContext.getInstance().getToken();
    RequestParams params = new RequestParams();
    params.put("token", token);
    params.put("name", name);
    params.put("avatar", avatar);
    BaseClient.post(url, params, responseHandler);
}
 
Example #15
Source File: AuthApi.java    From monolog-android with MIT License 5 votes vote down vote up
public static void open(String name, String openid, String gender, String avatar, String token, String type, TextHttpResponseHandler responseHandler) {
    String url = BaseClient.URL_POST_OPEN;
    RequestParams params = new RequestParams();
    params.put("open_id", openid);
    params.put("token", token);
    params.put("type", type);
    params.put("name", name);
    params.put("gender", gender);
    params.put("avatar", avatar);
    BaseClient.post(url, params, responseHandler);
}
 
Example #16
Source File: HttpClient.java    From ONE-Unofficial with Apache License 2.0 4 votes vote down vote up
public static void postByForm( String url, RequestParams params, TextHttpResponseHandler textHttpResponseHandler) {
    asyncHttpClient.post(context, url, params, textHttpResponseHandler);
}
 
Example #17
Source File: V2EX.java    From v2ex-daily-android with Apache License 2.0 4 votes vote down vote up
public static void getNotification(final Context context, String token, TextHttpResponseHandler responseHandler){
    getClient(context).get("https://www.v2ex.com/n/" + token + ".xml", responseHandler);
}
 
Example #18
Source File: BaseClient.java    From Luban-Circle-Demo with Apache License 2.0 2 votes vote down vote up
/**
 * 获取token
 * TODO 修改为你的网络模块
 * @param params
 * @param responseHandler
 */
public static void getToken(RequestParams params, TextHttpResponseHandler responseHandler) {

    client.get(URL_GET_OSS, params, responseHandler);
}