优化put示例json显示
This commit is contained in:
parent
66f1f4c2cf
commit
6a2eff6358
@ -16,11 +16,9 @@
|
||||
<string name="access_error">Access Error</string>
|
||||
<string name="access_permitted">Access Permitted</string>
|
||||
<string name="query_error">There may be something wrong,you can follow by the steps:\n\n1.Check your net connection\n\n2.Check the url whether it\'s an available ipv4 address\n\n3.Long click the [get] button to open the request by web browser\n\n4.Check logs outputed on the target server\n\n5.Try again</string>
|
||||
<string name="demo_post">{\n   \"tag\":"post_user",\n   \"User\":{\n      \"name\":"Tommy",\n      \"sex\":0,\n      \"phone\":"1234567890"\n   }\n}</string>
|
||||
<string name="demo_delete">{\n   \"tag\":"delete_user",\n   \"User\":{\n      \"id\":93794\n   }\n}</string>
|
||||
<string name="demo_put">{\n   \"tag\":"put_user",\n   \"User\":{\n      \"id\":38710,\n      \"picture\":"[ "http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000",
|
||||
"http://common.cnblogs.com/images/icon_weibo_24.png",
|
||||
"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000"]"\n   }\n}</string>
|
||||
<string name="demo_post">{\n   \"tag\":\"post_user\",\n   \"User\":{\n      \"name\":\"Tommy\",\n      \"sex\":0,\n      \"phone\":\"1234567890\"\n   }\n}</string>
|
||||
<string name="demo_delete">{\n   \"tag\":\"delete_user\",\n   \"User\":{\n      \"id\":93794\n   }\n}</string>
|
||||
<string name="demo_put">{\n   \"tag\":\"put_user\",\n   \"User\":{\n      \"id\":38710,\n      \"name\":\"Lemon\",\n      \"picture\":\"[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\", \"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000\"]\"\n   }\n}</string>
|
||||
<string name="demo_single">{\n   \"User\":{\n      \"id\":38710\n   }\n}</string>
|
||||
<string name="demo_columns">{\n   \"User\":{\n      \"columns\":\"id,name,phone\",\n      \"id\":38710\n   }\n}</string>
|
||||
<string name="demo_rely">{\n   \"User\":{\n      \"id\":70793\n   },\n   \"Work\":{\n      \"userId\":\"User/id\"\n   }\n}</string>
|
||||
|
@ -46,11 +46,14 @@ public class RequestUtil {
|
||||
|
||||
public static JSONObject newPutRequest() {
|
||||
User data = new User(38710);
|
||||
data.setName("Lemon");
|
||||
|
||||
List<String> list = new ArrayList<String>();
|
||||
list.add("http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000");
|
||||
list.add("http://common.cnblogs.com/images/icon_weibo_24.png");
|
||||
list.add("http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000");
|
||||
data.setPicture(JSON.toJSONString(list));
|
||||
|
||||
return new JSONRequest(data).setTag("put_user");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user