http请求返回场景--搜索

请求参数

08-17 14:51:55.307: E/1111111111111111111(7597): {"version":"1.3.4","search_text":"我是谁","size":"10","start_position":"1","order_by":"1","resolution":"480x800","phonetypeName":"HTC Desire S","os_version":"2.3.5","language":"cn","imei":"356708041471457","customerToken":"null"}

 

 

例如:

requestContent->{"count":20,"pageNo":0,"vodSearch":{"subjId":0,"endTime":"","startTime":"","vicaIds":0}}

 

可以这样:

JSONObject post_json = new JSONObject();
   post_json.put(ContentField.FIELD_TAG_COUNT, count);
   post_json.put(ContentField.FIELD_TAG_PAGE, pageNum);

   JSONObject vodSearch = new JSONObject();
   vodSearch.put("startTime", startTime);
   vodSearch.put("endTime", endTime);
   vodSearch.put("vicaIds", vicaIds);
   vodSearch.put("subjId", subjId);
   post_json.put("vodSearch", vodSearch);
   outcontent = post_json.toString();

 

 

另外:服务器端需要从流里读取数据。并且参数注意大小写,以免出现414,400错误。

 

服务器端接口
08-17 14:51:55.317: E/HttpRequester(7597): URI->http://gstore.joycloudtek.com:8080/gstore/amarket/searchproducts

 

返回结果
08-17 14:51:58.810: E/222222222222222222222(7597): {state:1,version:1.3.4,products:{current_size:2,total_size:2},product:[{"author_email":"","author_id":0,"releaseDate":"2012/10/24","resCapacity":491709,"resDescription":" 千篇一律的工作你厌倦了吗?现今如此快节奏的生活是否也令你感到些许无所适从呢?那么,不妨让自己的心灵放个假,也给自己一个机会,梦一场穿越时空的故事.看看回到了古代,你将以何种身份存在,又过着怎样的生活?记住,命运掌握在自己的手里,好与坏,都只在于你自己的选择.更新日志:1、更新了UI界面","resDeveloper":"iTiTa","resDownloadnum":48268,"resIcons":"http://gstore.joycloudtek.com/newfile//1/5753060fd62640929f2dc03c854085e0.png","resId":"21732","resLocation":"http://gstore.joycloudtek.com/newfile//1/0973a46dd77649a386912328adbe5c86.apk","resName":"古代我是谁","resPackagename":"com.wwd.who","resPrice":0,"resRated":3,"resRecommendflag":0,"resScreenshots":"http://gstore.joycloudtek.com/newfile/1/a7ac851294e44628a4d1cc0dd481afc7.jpg","resScreenshots2":"http://gstore.joycloudtek.com/newfile/1/4de21b85b05a4ac5b412cd59dc450b98.jpg","resScreenshots3":"http://gstore.joycloudtek.com/newfile/1/31640fcfb08544b98ef1a8fcce7dd1ba.jpg","resScreenshots4":"http://gstore.joycloudtek.com/newfile/1/fc45dd5ce4294c72a8c59a98da7436ce.jpg","resScreenshots5":null,"resScreenshots6":null,"resVersion":"V6.0","resVersionCode":6,"rescategoryId":[2,3],"rescategoryName":["应用","生活娱乐"],"userresPaystatus":0},{"author_email":"","author_id":0,"releaseDate":"2012/08/31","resCapacity":770483,"resDescription":" 千篇一律的工作你厌倦了吗?现今如此快节奏的生活是否也令你感到些许无所适从呢?那么,不妨让自己的心灵放个假,也给自己一个机会,梦一场穿越时空的故事。看看回到了古代,你将以何种身份存在,又过着怎样的生活?记住,命运掌握在自己的手里,好与坏,都只在于你自己的选择。准备好了就快快进入测试吧。","resDeveloper":"集智","resDownloadnum":18585,"resIcons":"http://gstore.joycloudtek.com/newfile//1/693fbd16e7a0483fbc1bcfeed5390883.png","resId":"51415","resLocation":"http://gstore.joycloudtek.com/newfile//1/3baaf68019a6425c8a78df28b540da4e.apk","resName":"古代我是谁?","resPackagename":"com.lhz.who","resPrice":0,"resRated":0,"resRecommendflag":0,"resScreenshots":"http://gstore.joycloudtek.com/newfile/1/d716917d238446618b567ee2220345c5.jpg","resScreenshots2":"http://gstore.joycloudtek.com/newfile/1/e5ff8316d03c4d488b10dd9a3943644e.jpg","resScreenshots3":"http://gstore.joycloudtek.com/newfile/1/cf8d060ffda04ea69f8306842aa8ccfa.jpg","resScreenshots4":"http://gstore.joycloudtek.com/newfile/1/e463687894204ebfb1f71a9ea1ba861f.jpg","resScreenshots5":null,"resScreenshots6":null,"resVersion":"V1.03","resVersionCode":4,"rescategoryId":[2,9],"rescategoryName":["应用","窗口小部件"],"userresPaystatus":0}]}


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值