框架集成地址Android,可以不再拷代碼了嗎?
參數(shù)說(shuō)明1:String(網(wǎng)絡(luò)請(qǐng)求地址)
參數(shù)說(shuō)明2:String(請(qǐng)求參數(shù),可以根據(jù)下面例子調(diào)用HttpParamUtil去生成參數(shù))
參數(shù)說(shuō)明3:String(ContentType,ContentType類(lèi)中有常用的三個(gè),如果不一樣,可以自己寫(xiě))
參數(shù)說(shuō)明4:boolean(是否打開(kāi)調(diào)試日志...設(shè)置為true 的時(shí)候 logcat中輸入 qqkj_frame)
HttpRequestUtil.getIns().get_http_post(String,String,
String,boolean)
函數(shù)返回值說(shuō)明:HttpResponseModel
HttpResponseModel._response_content (服務(wù)器返回的response內(nèi)容)
HttpResponseModel._response_code (服務(wù)器返回的狀態(tài)碼,例如 200, 404, 500等)
HttpResponseModel._response_error (返回true,表示請(qǐng)求成功,false,表示請(qǐng)求失敗)
HttpResponseModel._response_error_msg (請(qǐng)求后的提示信息,例如,服務(wù)器請(qǐng)求數(shù)據(jù)接口正常...請(qǐng)求失敗這類(lèi)的提示信息)
多說(shuō)一句,如果需要其他設(shè)置,可以使用HttpRequestUtil.getIns().xxxx
再多說(shuō)一句,,如果沒(méi)有你需要的,留言,我來(lái)加
來(lái)個(gè)例子吧