Java Code Examples for com.loopj.android.http.RequestParams#put()
The following examples show how to use
com.loopj.android.http.RequestParams#put() .
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: ArticleContentFragment.java From ONE-Unofficial with Apache License 2.0 | 6 votes |
@Override public void init() { lvArticle.addOnLikeChangeListener(this); Bundle bundle = getArguments(); String date = bundle.getString(Constants.KEY_DATE); index = bundle.getInt(Constants.KEY_INDEX); curDate = TimeUtil.getPreviousDate(date, index); RequestParams params = new RequestParams(); params.put("strMS", 1); params.put("strDate", date); params.put("strRow", index); getHttpData(Api.URL_ARTICLE, params, new HttpData("result", "contentEntity")); }
Example 2
Source File: WebAPI.java From MiBandDecompiled with Apache License 2.0 | 6 votes |
public static void updateSystemInfo(LoginData logindata, SystemInfo systeminfo, int i, AsyncHttpResponseHandler asynchttpresponsehandler) { RequestParams requestparams = BraceletHttpClient.getSysRp(logindata); requestparams.put("deviceid", systeminfo.deviceId); requestparams.put("mac", URLEncoder.encode(systeminfo.braceletMacAddress)); requestparams.put("devicetype", (new StringBuilder()).append("").append(i).toString()); requestparams.put("miui_version_code", systeminfo.miuiVersionCode); requestparams.put("miui_version_name", systeminfo.miuiVersionName); requestparams.put("phone_brand", systeminfo.phoneBrand); requestparams.put("phone_model", systeminfo.phoneModel); requestparams.put("phone_system", systeminfo.phoneSystem); requestparams.put("fwversion", systeminfo.fwVersion); requestparams.put("softversion", systeminfo.softVersion); String s = BraceletHttpClient.getUrl("huami.health.updatedevicedata.json"); BraceletHttpClient.client.post(s, requestparams, asynchttpresponsehandler); }
Example 3
Source File: AuthApi.java From monolog-android with MIT License | 5 votes |
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 4
Source File: StatueApi.java From monolog-android with MIT License | 5 votes |
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 5
Source File: StatueApi.java From monolog-android with MIT License | 5 votes |
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 6
Source File: StatueApi.java From monolog-android with MIT License | 5 votes |
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 7
Source File: WebAPI.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void getUserInfo(LoginData logindata, long l, AsyncHttpResponseHandler asynchttpresponsehandler) { RequestParams requestparams = BraceletHttpClient.getSysRp(logindata); requestparams.put("uid", (new StringBuilder()).append("").append(l).toString()); String s = BraceletHttpClient.getUrl("huami.health.getUserInfo.json"); BraceletHttpClient.client.post(s, requestparams, asynchttpresponsehandler); }
Example 8
Source File: AuthApi.java From monolog-android with MIT License | 5 votes |
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 9
Source File: AskingFragmentActivity.java From WeCenterMobile-Android with GNU General Public License v2.0 | 5 votes |
@Override public boolean onOptionsItemSelected(MenuItem item) { // TODO Auto-generated method stub switch (item.getItemId()) { case android.R.id.home: finish(); break; case R.id.publish: try { String quesdetil = ((DetailFragment) text2).getTextString() .getText().toString(); String question = ((AskingFragment) text1).getTextString().getText() .toString(); String questag = ((TagFragment) text3).getTextString().getText() .toString(); RequestParams params = new RequestParams(); params.put("question_content", question); params.put("question_detail", quesdetil); params.put("attach_access_key", attach_access_key); params.put("topics", questag); quespost(params); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); Toast.makeText(this, "请完善内�?", Toast.LENGTH_LONG).show(); ; } break; default: break; } return super.onOptionsItemSelected(item); }
Example 10
Source File: WebAPI.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void getWeixinQR(LoginData logindata, String s, AsyncHttpResponseHandler asynchttpresponsehandler) { RequestParams requestparams = BraceletHttpClient.getSysRp(logindata); requestparams.put("deviceid", s); String s1 = BraceletHttpClient.getUrl("huami.health.createwxqr.json"); BraceletHttpClient.client.post(s1, requestparams, asynchttpresponsehandler); }
Example 11
Source File: AuthApi.java From monolog-android with MIT License | 5 votes |
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 12
Source File: AuthApi.java From monolog-android with MIT License | 5 votes |
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 13
Source File: QuestionContentFragment.java From ONE-Unofficial with Apache License 2.0 | 5 votes |
@Override public void onLikeChanged() { RequestParams requestParams = new RequestParams(); requestParams.put("strPraiseItemId", curQuestion.strQuestionId); //不清楚strDeviceId为什么标识符,格式为“ffffffff-9248-aa0c-ffff-ffffaea9cc69” requestParams.put("strDeviceId", ""); requestParams.put("strAppName", "ONE"); requestParams.put("strPraiseItem", "QUESTION"); getHttpData(Api.URL_LIKE_OR_CANCLELIKE, requestParams, new HttpData("result", "entPraise")); }
Example 14
Source File: BuidUrl.java From Mobike with Apache License 2.0 | 5 votes |
/** * 信用积分 * * @return */ public static String getCredit()//s { RequestParams requestParms = new RequestParams(); requestParms.put("userid", useid);//q.getUrl().d() requestParms.put("times", System.currentTimeMillis()); requestParms.put("lang", Locale.getDefault().getLanguage()); return getUrl("/credit/index.html", requestParms); }
Example 15
Source File: ArticleContentFragment.java From ONE-Unofficial with Apache License 2.0 | 5 votes |
@Override public void onLikeChanged() { RequestParams requestParams = new RequestParams(); requestParams.put("strPraiseItemId", curArticle.strContentId); requestParams.put("strDeviceId", ""); requestParams.put("strAppName", "ONE"); requestParams.put("strPraiseItem", "CONTENT"); getHttpData(Api.URL_LIKE_OR_CANCLELIKE, requestParams, new HttpData("result", "entPraise")); }
Example 16
Source File: BuidUrl.java From Mobike with Apache License 2.0 | 5 votes |
/** * 关于我们 * * @return */ public static String getAboutus()//b { RequestParams requestParms = new RequestParams(); requestParms.put("version", "4.4.1");//MyApplication.getUrl requestParms.put("lang", Locale.getDefault().getLanguage()); return getUrl("/aboutus/index.html", requestParms); }
Example 17
Source File: WebAPI.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void updateProfile(LoginData logindata, HashMap hashmap, AsyncHttpResponseHandler asynchttpresponsehandler) { HashMap hashmap1 = BraceletHttpClient.getSysHm(logindata); hashmap1.putAll(hashmap); String s = BraceletHttpClient.getUrl("huami.health.bindProfile.json"); String s1 = (String)hashmap.get("icon_path"); hashmap1.remove("icon_path"); RequestParams requestparams = new RequestParams(); java.util.Map.Entry entry; for (Iterator iterator = hashmap1.entrySet().iterator(); iterator.hasNext(); requestparams.put((String)entry.getKey(), (String)entry.getValue())) { entry = (java.util.Map.Entry)iterator.next(); } if (s1 == null || s1.length() < 1) { BraceletHttpClient.client.post(s, requestparams, asynchttpresponsehandler); return; } try { requestparams.put("icon", new File(s1)); } catch (FileNotFoundException filenotfoundexception) { BraceletHttpClient.client.post(s, requestparams, asynchttpresponsehandler); return; } BraceletHttpClient.client.post(s, requestparams, asynchttpresponsehandler); }
Example 18
Source File: BuidUrl.java From Mobike with Apache License 2.0 | 4 votes |
public static String getProgrestatus()//y { RequestParams requestParms = new RequestParams(); requestParms.put("userid", useid);//q.getUrl().d() return getUrl("/progrestatus/index.html", requestParms); }
Example 19
Source File: EditReview.java From StreamHub-Android-SDK with MIT License | 4 votes |
public void onClick(View v) { if (!isNetworkAvailable()) { showToast("Network Not Available"); return; } showProgressDialog(); title = editReviewTitleEt.getText().toString(); body = editReviewBodyEt.getText().toString(); rating = (int) (editReviewRatingBar.getRating() * 20); if (title.length() == 0) { showAlert("Please enter title before post.", "ok", tryAgain); return; } if (body.length() == 0) { showAlert("Please enter description before post.", "ok", tryAgain); return; } if (rating == 0) { showAlert("Please give rating before post.", "ok", tryAgain); return; } String htmlBody = Html.toHtml(editReviewBodyEt.getText()); RequestParams parameters = new RequestParams(); parameters.put(LFSConstants.LFSPostBodyKey, htmlBody); parameters.put(LFSConstants.LFSPostTitleKey, editReviewTitleEt .getText().toString()); parameters.put(LFSConstants.LFSPostType, LFSConstants.LFSPostTypeReview); JSONObject ratingJson = new JSONObject(); try { ratingJson.put("default", rating + ""); parameters.put(LFSConstants.LFSPostRatingKey, ratingJson.toString()); } catch (JSONException e) { e.printStackTrace(); } parameters.put(LFSConstants.LFSPostUserTokenKey, LFSConfig.USER_TOKEN); WriteClient.postAction(LFSConfig.COLLECTION_ID, id, LFSConfig.USER_TOKEN, LFSActions.EDIT, parameters, new editCallback()); }
Example 20
Source File: HttpRequestUsed.java From AndJie with GNU General Public License v2.0 | 4 votes |
public HttpRequestUsed(){ RequestParams params = new RequestParams(); params.put("name", "jwzhangjie"); params.put("pwd", "****"); LoginRequest("/login", params); }