• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

smarek/httpclient-android: HttpClient repackaged for Android

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

smarek/httpclient-android

开源软件地址(OpenSource Url):

https://github.com/smarek/httpclient-android

开源编程语言(OpenSource Language):

Java 74.0%

开源软件介绍(OpenSource Introduction):

httpclient-android Build Status

Build script and dependencies to create repackaged upstream version of HttpClient and depdendencies (HttpMime, HttpCore, HttpClient-Cache) and get it working on Android API version from 3 to 23

Current version: 4.5.8 (originating from upstream HttpClient 4.5.8 version)

Usage

Download the repository and simply hit ./build.sh script

Dependencies

Required dependencies are:

  • JDK 6 or newer
  • Gradle 2.4 or newer
  • find, grep, svn, patch and sed (or gsed for OS X)
  • for Kerberos support you need Android NDK, git and swig

## Configuration

Build params (ENV variables) you can use:

  • USE_GRADLE_WRAPPER, set to 0 if you want to use current Gradle from PATH
  • UPDATE_UPSTREAM, whether the build script should download SVN/GIT/... sources again (useful for recurring builds)
  • SED_CMD used variant of SED utility (default is sed -i on linux and gsed -i on Mac OS X)
  • INCLUDE_JGSS_API, experimental, whether to include Kerberos API and Negotiate, SPNego, GGS, Kerberos Auth schemes implementation
  • VERBOSE, set to 1 to get more verbose output

Maven Central

This repository version will publish the library under namespace cz.msebera.android:httpclient:4.5.8

## Maven Local

Using gradle installArchives will install the library to local Maven repository

Gradle

Gradle dependency string, once you have it installed

dependencies {
  compile "cz.msebera.android:httpclient:4.5.8"
}

Or you can simply depend on the project, like this (httpclient-android is resulting Gradle project dir)

dependencies {
  compile project("/path/to/generated/project/httpclient-android")
}

Testing the library on the device

To test the library, you can use provided android app template, in the /testing-android-app folder

This template currently just shows the response from https://httpbin.org/headers if successfull, and the error message otherwise

cd testing-android-app
./gradlew clean instalDebug
adb shell am start -n cz.msebera.android.httpclient.test/.MainActivity

If everything goes well, you should see, within seconds after running the last command, json with http headers of just finished HttpGet




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap