安卓json文件怎么打開 怎么獲取安卓apk請(qǐng)求的json地址?
怎么獲取安卓apk請(qǐng)求的json地址?Httpclient=new Httpclient()postmethod post=new postmethod(“your URL”)//準(zhǔn)備參數(shù),可以是多個(gè)
怎么獲取安卓apk請(qǐng)求的json地址?
Httpclient=new Httpclient()
postmethod post=new postmethod(“your URL”)//準(zhǔn)備參數(shù),可以是多個(gè)
namevaluepair simcard=new namevaluepair(“key”,“值)”post.setRequestBody(New namevaluepair[]{simcard})]//執(zhí)行請(qǐng)求client.executeMethod方法(方法)
//獲取返回值
字符串響應(yīng)=新字符串(方法.getResponseBodyAsString(). GetBytes(“iso-8859-1”)
//有很多方法可以將JSON字符串轉(zhuǎn)換為對(duì)象
sonobject result=new jsonobject(response)