diff --git a/sample/src/com/lidroid/xutils/sample/fragment/HttpFragment.java b/sample/src/com/lidroid/xutils/sample/fragment/HttpFragment.java index 23352a3..b8f56ff 100644 --- a/sample/src/com/lidroid/xutils/sample/fragment/HttpFragment.java +++ b/sample/src/com/lidroid/xutils/sample/fragment/HttpFragment.java @@ -100,7 +100,7 @@ public void onDestroy() { @ResInject(id = R.string.download_label, type = ResType.String) private String label; - @OnClick(R.id.download_btn) + //@OnClick(R.id.download_btn) public void download(View view) { String target = "/sdcard/xUtils/" + System.currentTimeMillis() + "lzfile.apk"; try { @@ -118,7 +118,7 @@ public void download(View view) { /////////////////////////////////////// other //////////////////////////////////////////////////////////////// - //@OnClick(R.id.download_btn) + @OnClick(R.id.download_btn) public void testUpload(View view) { RequestParams params = new RequestParams("GBK"); //params.addQueryStringParameter("method", "upload"); @@ -128,12 +128,13 @@ public void testUpload(View view) { // "3.9b885b6c56b8798ab69b3ba39238e4fc.2592000.1384929178.3590808424-248414"); //params.addBodyParameter("file", new File("/sdcard/test.zip")); + params.addQueryStringParameter("qmsg", "你好"); params.addBodyParameter("msg", "测试"); HttpUtils http = new HttpUtils(); http.configResponseTextCharset("GBK"); http.send(HttpRequest.HttpMethod.POST, - "http://192.168.43.144:8080/UploadServlet", + "http://192.168.1.5:8080/UploadServlet", params, new RequestCallBack() {