public void request(ICourseDetailResponse courseDetailRespnce, final String courseId) { super.initBaseRequest(courseDetailRespnce); mCourseDetailRespnce = courseDetailRespnce; /*if(mCourseDetailRespnce!=null) { mCourseDetailRespnce.success(getTestCourse()); } */ MyStringRequest stringRequest = new MyStringRequest(Method.POST, RequestUrlConstants.GET_COURSE_DETAIL_URL, this, this) { @Override protected Map<String, String> getParams() throws AuthFailureError { Map<String, String> map = getRequestBasicMap(); map.put(COURSE_ID, courseId); traceNormal(TAG, map.toString()); traceNormal( TAG, GetCourseDetailRequest.this.getUrl(RequestUrlConstants.GET_COURSE_DETAIL_URL, map)); return map; } }; stringRequest.setRetryPolicy( new DefaultRetryPolicy(30000, 0, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)); getQueue().add(stringRequest); }
public void request(NorResponce norResponce, final User user) { super.initBaseRequest(norResponce); mNorResponce = norResponce; mUser = user; MyStringRequest stringRequest = new MyStringRequest(Method.POST, RequestUrlConstants.UPDATE_USER_INFO, this, this) { @Override protected Map<String, String> getParams() throws AuthFailureError { Map<String, String> map = getRequestBasicMap(); map.put(USER_JSON, getUserJSonDescription(user)); traceNormal(TAG, map.toString()); traceNormal( TAG, UpdateUserInfoRequest.this.getUrl(RequestUrlConstants.UPDATE_USER_INFO, map)); return map; } }; stringRequest.setRetryPolicy(new DefaultRetryPolicy(30000, 0, 0)); getQueue().add(stringRequest); }