Java Code Examples for org.kymjs.kjframe.KJHttp#get()

The following examples show how to use org.kymjs.kjframe.KJHttp#get() . 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: HttpActivity.java    From KJFrameForAndroid with Apache License 2.0 6 votes vote down vote up
/**
 * 附带有Http请求头的get请求
 */
private void getWithHeader() {
    KJHttp kjh = new KJHttp();
    HttpParams params = new HttpParams();
    params.put("uid", 863548);
    params.put("teamid", 12375);
    params.put("pageIndex", 0);
    params.put("pageSize", 20);
    params.put("type", "all");
    params.putHeaders("cookie", "cookie不能告诉你");
    kjh.get("http://team.oschina.net/action/api/team_active_list", params,
            new HttpCallBack() {
                @Override
                public void onSuccess(String t) {
                    super.onSuccess(t);
                    toast(t);
                }
            });
}
 
Example 2
Source File: HttpActivity.java    From KJFrameForAndroid with Apache License 2.0 5 votes vote down vote up
private void get() {
    KJHttp kjh = new KJHttp();
    HttpParams params = new HttpParams();
    params.put("pageIndex", 0);
    params.put("pageSize", 20);
    kjh.get("http://www.oschina.net/action/api/tweet_list", params,
            new HttpCallBack() {
                @Override
                public void onSuccess(String t) {
                    super.onSuccess(t);
                    toast(t);
                }
            });
}