Skip to content

Commit e752d32

Browse files
committed
RequestUtil请求改为和显示一致
1 parent 3b3cf08 commit e752d32

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/src/apijson/demo/RequestUtil.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,38 +35,38 @@ public static JSONObject newPostRequest() {
3535
data.setName("Tommy");// 测试necessaryColumns = [name,phone]通过
3636
data.setSex(0);
3737
data.setPhone("1234567890");// 测试necessaryColumns = [name,phone]通过
38-
data.setHead("http://common.cnblogs.com/images/icon_weibo_24.png");
38+
// data.setHead("http://common.cnblogs.com/images/icon_weibo_24.png");
3939
JSONRequest request = new JSONRequest();
4040
request.put(data);
4141
return request.setTag(User.class.getSimpleName());//;// 测试必须指定tag通过
4242
}
43-
43+
4444
public static JSONObject newDeleteRequest() {
4545
// 测试necessaryColumns = [id]通过
4646
// 测试对象不存在通过,存在返回success通过
4747
return new JSONRequest(new User(10000)).setTag(User.class.getSimpleName());//;// 测试必须指定tag通过
4848
}
49-
49+
5050
public static JSONObject newPutRequest() {
5151
User data = new User(38710);//);// 测试necessaryColumns = [id]通过
5252
data.setName("Lemon");
5353
//测试disallowColumns = [phone]通过 data.setPhone("1234567890");
54-
54+
5555
List<String> list = new ArrayList<String>();
5656
list.add("http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000");
5757
list.add("http://common.cnblogs.com/images/icon_weibo_24.png");
5858
list.add("http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000");
5959
data.setPicture(JSON.toJSONString(list));//"\"" + JSON.toJSONString(new JSONObject("{\"id\":2}")) + "\"");//
60-
60+
6161
return new JSONRequest(data).setTag(User.class.getSimpleName());
6262
}
6363

64-
65-
64+
65+
6666
public static JSONObject newSingleRequest() {
6767
return new JSONRequest(new User(38710));
6868
}
69-
69+
7070
public static JSONObject newColumnsRequest() {
7171
JSONObject object = new JSONObject(new User(38710));
7272
object.setColumns("id,name,phone");//StringUtil.getString(new String[]{"id", "name", "phone"}));//
@@ -79,7 +79,7 @@ public static JSONObject newRelyRequest() {
7979
request.put(Work.class.getSimpleName(), new JSONRequest("userId", "User/id"));
8080
return request;
8181
}
82-
82+
8383
public static JSONObject newArrayRequest() {
8484
return new JSONRequest(new User()).toArray(5, 1, User.class.getSimpleName());
8585
}
@@ -98,7 +98,7 @@ public static JSONObject newComplexRequest() {
9898
public static JSONObject newAccessErrorRequest() {
9999
return new JSONRequest(new Wallet(38710));
100100
}
101-
101+
102102
public static JSONObject newAccessPermittedRequest() {
103103
JSONRequest request = new JSONRequest();
104104
request.put(new Wallet().setUserId((long) 38710));

0 commit comments

Comments
 (0)