Android代码-UrlHttpUtils

上传者: 39840588 | 上传时间: 2023-03-07 00:31:48 | 文件大小: 147KB | 文件类型: ZIP
UrlHttpUtils 最简单的UrlHttpUtils封装,CallBack方法执行在UI线程。支持get请求,post请求,支持文件上传和下载。 使用方法: 代码很简单,只有五个Java文件,建议下载后将Java文件拷贝到工程中使用。 封装的功能有: 一般的get请求 一般的post请求 上传单个文件(包含进度) 上传list集合文件 上传map集合文件 文件下载(包含进度) 图片下载(实现了图片的压缩) 使用示例 GET请求 String url = "https://www.baidu.com/"; UrlHttpUtil.get(url, new CallBackUtil.CallBackString() { @Override public void onFailure(int code, String errorMessage) { } @Override public void onResponse(String response) { } }); POST请求 String url = "https://www.

文件下载

资源详情

[{"title":"( 58 个子文件 147KB ) Android代码-UrlHttpUtils","children":[{"title":"UrlHttpUtils-master","children":[{"title":"gradlew.bat <span style='color:#111;'> 2.26KB </span>","children":null,"spread":false},{"title":"gradlew <span style='color:#111;'> 4.85KB </span>","children":null,"spread":false},{"title":"gradle.properties <span style='color:#111;'> 730B </span>","children":null,"spread":false},{"title":"README.md.bak <span style='color:#111;'> 2.05KB </span>","children":null,"spread":false},{"title":"gradle","children":[{"title":"wrapper","children":[{"title":"gradle-wrapper.jar <span style='color:#111;'> 52.38KB </span>","children":null,"spread":false},{"title":"gradle-wrapper.properties <span style='color:#111;'> 233B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".idea","children":[{"title":"gradle.xml <span style='color:#111;'> 694B </span>","children":null,"spread":false},{"title":"runConfigurations.xml <span style='color:#111;'> 564B </span>","children":null,"spread":false},{"title":"misc.xml <span style='color:#111;'> 2.58KB </span>","children":null,"spread":false},{"title":"copyright","children":[{"title":"profiles_settings.xml <span style='color:#111;'> 74B </span>","children":null,"spread":false}],"spread":true},{"title":"modules.xml <span style='color:#111;'> 534B </span>","children":null,"spread":false},{"title":"encodings.xml <span style='color:#111;'> 159B </span>","children":null,"spread":false},{"title":"compiler.xml <span style='color:#111;'> 686B </span>","children":null,"spread":false}],"spread":true},{"title":"urlhttputils","children":[{"title":"proguard-rules.pro <span style='color:#111;'> 645B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"com","children":[{"title":"guozheng","children":[{"title":"urlhttputils","children":[{"title":"ExampleUnitTest.java <span style='color:#111;'> 403B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"androidTest","children":[{"title":"java","children":[{"title":"com","children":[{"title":"guozheng","children":[{"title":"urlhttputils","children":[{"title":"ExampleInstrumentedTest.java <span style='color:#111;'> 754B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"res","children":[{"title":"mipmap-xxxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 10.24KB </span>","children":null,"spread":false}],"spread":false},{"title":"mipmap-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.34KB </span>","children":null,"spread":false}],"spread":false},{"title":"values","children":[{"title":"colors.xml <span style='color:#111;'> 208B </span>","children":null,"spread":false},{"title":"strings.xml <span style='color:#111;'> 75B </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 383B </span>","children":null,"spread":false},{"title":"dimens.xml <span style='color:#111;'> 211B </span>","children":null,"spread":false}],"spread":false},{"title":"mipmap-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 7.54KB </span>","children":null,"spread":false}],"spread":false},{"title":"mipmap-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 2.15KB </span>","children":null,"spread":false}],"spread":false},{"title":"mipmap-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 4.73KB </span>","children":null,"spread":false}],"spread":false},{"title":"layout","children":[{"title":"activity_main.xml <span style='color:#111;'> 717B </span>","children":null,"spread":false}],"spread":false},{"title":"values-w820dp","children":[{"title":"dimens.xml <span style='color:#111;'> 358B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"guozheng","children":[{"title":"urlhttputils","children":[{"title":"MainActivity.java <span style='color:#111;'> 338B </span>","children":null,"spread":false},{"title":"urlhttp","children":[{"title":"RequestUtil.java <span style='color:#111;'> 5.51KB </span>","children":null,"spread":false},{"title":"RealRequest.java <span style='color:#111;'> 8.41KB </span>","children":null,"spread":false},{"title":"CallBackUtil.java <span style='color:#111;'> 7.66KB </span>","children":null,"spread":false},{"title":"RealResponse.java <span style='color:#111;'> 305B </span>","children":null,"spread":false},{"title":"UrlHttpUtil.java <span style='color:#111;'> 11.71KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"AndroidManifest.xml <span style='color:#111;'> 633B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".gitignore <span style='color:#111;'> 7B </span>","children":null,"spread":false},{"title":"build.gradle <span style='color:#111;'> 822B </span>","children":null,"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 118B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 2.05KB </span>","children":null,"spread":false},{"title":"sampleurlhttp","children":[{"title":"proguard-rules.pro <span style='color:#111;'> 645B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"com","children":[{"title":"guozheng","children":[{"title":"sampleurlhttp","children":[{"title":"ExampleUnitTest.java <span style='color:#111;'> 404B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":true},{"title":"androidTest","children":[{"title":"java","children":[{"title":"com","children":[{"title":"guozheng","children":[{"title":"sampleurlhttp","children":[{"title":"ExampleInstrumentedTest.java <span style='color:#111;'> 756B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"main","children":[{"title":"res","children":[{"title":"mipmap-xxxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 10.24KB </span>","children":null,"spread":false}],"spread":false},{"title":"mipmap-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.34KB </span>","children":null,"spread":false}],"spread":false},{"title":"values","children":[{"title":"colors.xml <span style='color:#111;'> 208B </span>","children":null,"spread":false},{"title":"strings.xml <span style='color:#111;'> 76B </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 383B </span>","children":null,"spread":false},{"title":"dimens.xml <span style='color:#111;'> 211B </span>","children":null,"spread":false}],"spread":false},{"title":"mipmap-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 7.54KB </span>","children":null,"spread":false}],"spread":false},{"title":"mipmap-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 2.15KB </span>","children":null,"spread":false}],"spread":false},{"title":"mipmap-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 4.73KB </span>","children":null,"spread":false}],"spread":false},{"title":"layout","children":[{"title":"activity_main.xml <span style='color:#111;'> 879B </span>","children":null,"spread":false}],"spread":false},{"title":"values-w820dp","children":[{"title":"dimens.xml <span style='color:#111;'> 358B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"java","children":[{"title":"com","children":[{"title":"guozheng","children":[{"title":"sampleurlhttp","children":[{"title":"MainActivity.java <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"AndroidManifest.xml <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 7B </span>","children":null,"spread":false},{"title":"build.gradle <span style='color:#111;'> 915B </span>","children":null,"spread":false}],"spread":true},{"title":"settings.gradle <span style='color:#111;'> 43B </span>","children":null,"spread":false},{"title":"build.gradle <span style='color:#111;'> 498B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明