Advertisement
Guest User

Untitled

a guest
Apr 30th, 2017
4,360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.21 KB | None | 0 0
  1. package com.globalegrow.app.gearbest;
  2.  
  3. import android.content.Context;
  4. import android.util.Log;
  5. import com.globalegrow.app.gearbest.p049b.Authcode;
  6. import com.globalegrow.app.gearbest.p049b.GearbestUtil;
  7. import com.p026a.p027a.p028a.AsyncHttpClient;
  8. import com.p026a.p027a.p028a.AsyncHttpResponseHandler;
  9. import com.p026a.p027a.p028a.RequestParams;
  10. import com.p026a.p027a.p028a.ResponseHandlerInterface;
  11. import com.p026a.p027a.p028a.SyncHttpClient;
  12. import org.apache.http.entity.StringEntity;
  13. import org.json.JSONObject;
  14. import p013b.p014a.p015a.p016a.p017a.p019b.AbstractSpiCall;
  15.  
  16. /* renamed from: com.globalegrow.app.gearbest.d */
  17. public class GearbestRestClient {
  18.     private static AsyncHttpClient f3081a;
  19.     private static AsyncHttpClient f3082b;
  20.  
  21.     static {
  22.         f3081a = new AsyncHttpClient();
  23.         f3082b = new SyncHttpClient();
  24.     }
  25.  
  26.     public static void m2880a(Context context, String str, JSONObject jSONObject, AsyncHttpResponseHandler asyncHttpResponseHandler) {
  27.         try {
  28.             String str2 = "http://app.gearbest.com/api.php" + str + "&isenc=1";
  29.             if (jSONObject != null) {
  30.                 jSONObject.put("commparam", "ver=" + GearbestUtil.m2497a().m2510b(context) + "&pf=android");
  31.             }
  32.             Log.d("APP-HTTP", "request url-->" + str2 + (jSONObject != null ? ",json params:" + jSONObject.toString() : "params is null"));
  33.             f3081a.m1465a(context, str2, new StringEntity(Authcode.m2471a(jSONObject.toString(), "a784b4e023a4c3544a2af80e59ae55eb")), AbstractSpiCall.ACCEPT_JSON_VALUE, asyncHttpResponseHandler);
  34.         } catch (Exception e) {
  35.             e.printStackTrace();
  36.         }
  37.     }
  38.  
  39.     public static void m2879a(Context context, String str, RequestParams requestParams, AsyncHttpResponseHandler asyncHttpResponseHandler) {
  40.         Log.d("APP-HTTP", "Get\u8bf7\u6c42,\u5f00\u59cb\u6267\u884c\u7f51\u7edc\u8bf7\u6c42\u64cd\u4f5c,url:" + str + ",params:" + requestParams.toString());
  41.         f3081a.m1466a(str, requestParams, (ResponseHandlerInterface) asyncHttpResponseHandler);
  42.     }
  43.  
  44.     public static void m2881b(Context context, String str, JSONObject jSONObject, AsyncHttpResponseHandler asyncHttpResponseHandler) {
  45.         try {
  46.             String str2 = "http://app.gearbest.com/api.php" + str + "&isenc=1";
  47.             if (jSONObject != null) {
  48.                 jSONObject.put("commparam", "ver=" + GearbestUtil.m2497a().m2510b(context) + "&pf=android");
  49.             }
  50.             Log.d("APP-HTTP", "request url-->" + str2 + (jSONObject != null ? ",json params:" + jSONObject.toString() : "params is null"));
  51.             f3082b.m1465a(context, str2, new StringEntity(Authcode.m2471a(jSONObject.toString(), "a784b4e023a4c3544a2af80e59ae55eb")), AbstractSpiCall.ACCEPT_JSON_VALUE, asyncHttpResponseHandler);
  52.         } catch (Exception e) {
  53.             e.printStackTrace();
  54.         }
  55.     }
  56.  
  57.     public static void m2878a(Context context, RequestParams requestParams, AsyncHttpResponseHandler asyncHttpResponseHandler) {
  58.         Log.d("APP-HTTP", "request url-->" + requestParams.toString());
  59.         f3081a.m1464a(context, "http://www.gearbest.com/eload_admin/crontab/update_notice_keyword.php", requestParams, asyncHttpResponseHandler);
  60.     }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement