rburgst / Okhttp Digest
Licence: apache-2.0
a digest authenticator for okhttp
Stars: ✭ 141
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Okhttp Digest
Baseokhttpv3
🔥OkHttp的二次封装库,提供各种快速使用方法以及更为方便的扩展功能。提供更高效的Json请求和解析工具以及文件上传下载封装,HTTPS和Cookie操作也更得心应手。
Stars: ✭ 121 (-14.18%)
Mutual labels: okhttp
Contentful.java
Java SDK for Contentful's Content Delivery API
Stars: ✭ 63 (-55.32%)
Mutual labels: okhttp
Mvpframes
整合大量主流开源项目并且可高度配置化的 Android MVP 快速集成框架,支持 AndroidX
Stars: ✭ 100 (-29.08%)
Mutual labels: okhttp
Chucker
🔎 An HTTP inspector for Android & OkHTTP (like Charles but on device)
Stars: ✭ 2,169 (+1438.3%)
Mutual labels: okhttp
Kotlin Networking
Kotlin Networking - An elegant networking library written in Kotlin
Stars: ✭ 88 (-37.59%)
Mutual labels: okhttp
Livedata Call Adapter
A simple LiveData call adapter for retrofit
Stars: ✭ 119 (-15.6%)
Mutual labels: okhttp
Httprequestprocessor
网络请求隔离框架简单封装,有两种实现方式:一种是代理模式实现的,一种是工厂模式实现的。
Stars: ✭ 76 (-46.1%)
Mutual labels: okhttp
Aachulk
️🔥️🔥️🔥AACHulk是以Google的ViewModel+DataBinding+LiveData+Lifecycles框架为基础, 结合Okhttp+Retrofit+BaseRecyclerViewAdapterHelper+SmartRefreshLayout+ARouter打造的一款快速MVVM开发框架
Stars: ✭ 109 (-22.7%)
Mutual labels: okhttp
Okhttp Okgo
OkGo - 3.0 震撼来袭,该库是基于 Http 协议,封装了 OkHttp 的网络请求框架,比 Retrofit 更简单易用,支持 RxJava,RxJava2,支持自定义缓存,支持批量断点下载管理和批量上传管理功能
Stars: ✭ 10,407 (+7280.85%)
Mutual labels: okhttp
Jetpackmvvm
🐔🏀一个Jetpack结合MVVM的快速开发框架,基于MVVM模式集成谷歌官方推荐的JetPack组件库:LiveData、ViewModel、Lifecycle、Navigation组件 使用Kotlin语言,添加大量拓展函数,简化代码 加入Retrofit网络请求,协程,帮你简化各种操作,让你快速开发项目
Stars: ✭ 1,100 (+680.14%)
Mutual labels: okhttp
Okhttps
如艺术一般优雅,像 1、2、3 一样简单,前后端通用,轻量却强大的 HTTP 客户端(同时支持 WebSocket 与 Stomp 协议)
Stars: ✭ 92 (-34.75%)
Mutual labels: okhttp
Android Base Mvp
Android Base MVP Concept with RXJava, Dagger, Event Bus, Retrofit, Glide, OkHTTP
Stars: ✭ 141 (+0%)
Mutual labels: okhttp
Kingtv
📺 高仿全民直播(全民TV),项目采用 MVP + RXJava + Retrofit + OKHttp + Material Design + Dagger2 + Base + Glide + GreenDao构建。因为全民TV已经凉了,导致App已经连不上。所以本项目已暂停维护。仅供学习。 推荐MVPFrame: https://github.com/jenly1314/MVPFrame 和你值得拥有的MVVMFrame快速开发框架: https://github.com/jenly1314/MVVMFrame
Stars: ✭ 1,594 (+1030.5%)
Mutual labels: okhttp
Android Livedata Viewmodel
Android app that demonstrates how to use new Architecture components.
Stars: ✭ 114 (-19.15%)
Mutual labels: okhttp
okhttp-digest
A digest authenticator for okhttp. Most of the code is ported from Apache Http Client.
Important
This artifact has moved from jcenter to maven central! The coordinates have changed from
com.burgstaller:okhttp-digest:<version>
to io.github.rburgst:okhttp-digest:<version>
For more details, see #71.
Usage
final DigestAuthenticator authenticator = new DigestAuthenticator(new Credentials("username", "pass"));
final Map<String, CachingAuthenticator> authCache = new ConcurrentHashMap<>();
final OkHttpClient client = new OkHttpClient.Builder()
.authenticator(new CachingAuthenticatorDecorator(authenticator, authCache))
.addInterceptor(new AuthenticationCacheInterceptor(authCache))
.build();
String url = "http://www.google.com";
Request request = new Request.Builder()
.url(url)
.get()
.build();
Response response = client.newCall(request).execute();
If you want to support multiple authentication schemes (including auth caching) then this should work:
OkHttpClient.Builder builder = new OkHttpClient.Builder();
final Map<String, CachingAuthenticator> authCache = new ConcurrentHashMap<>();
Credentials credentials = new Credentials("username", "pass");
final BasicAuthenticator basicAuthenticator = new BasicAuthenticator(credentials);
final DigestAuthenticator digestAuthenticator = new DigestAuthenticator(credentials);
// note that all auth schemes should be registered as lowercase!
DispatchingAuthenticator authenticator = new DispatchingAuthenticator.Builder()
.with("digest", digestAuthenticator)
.with("basic", basicAuthenticator)
.build();
client = builder
.authenticator(new CachingAuthenticatorDecorator(authenticator, authCache))
.addInterceptor(new AuthenticationCacheInterceptor(authCache))
.addNetworkInterceptor(logger)
.build();
Use via gradle
implementation 'io.github.rburgst:okhttp-digest:2.5'
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].