All Projects → JessYanCoding → Retrofiturlmanager

JessYanCoding / Retrofiturlmanager

Licence: apache-2.0
🔮 Let Retrofit support multiple baseUrl and can be change the baseUrl at runtime (以最简洁的 Api 让 Retrofit 同时支持多个 BaseUrl 以及动态改变 BaseUrl).

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Retrofiturlmanager

RetrofitHelper
💪 RetrofitHelper是一个支持配置多个BaseUrl,支持动态改变BaseUrl,动态配置超时时长的Retrofit帮助类
Stars: ✭ 15 (-99.24%)
Mutual labels:  retrofit, okhttp, baseurl, retrofit2, baseurl-domain
WanAndroid
wanandroid的Kotlin版,采用Android X
Stars: ✭ 20 (-98.98%)
Mutual labels:  retrofit, okhttp, retrofit2, okhttp3
Progressmanager
⏳ Listen the progress of downloading and uploading in Okhttp, compatible Retrofit and Glide (一行代码即可监听 App 中所有网络链接的上传以及下载进度, 包括 Glide 的图片加载进度).
Stars: ✭ 2,463 (+25.6%)
Mutual labels:  okhttp, retrofit, mvparms, arms
RxHttp
基于RxJava2+Retrofit+OkHttp4.x封装的网络请求类库,亮点多多,完美兼容MVVM(ViewModel,LiveData),天生支持网络请求和生命周期绑定,天生支持多BaseUrl,支持文件上传下载进度监听,支持断点下载,支持Glide和网络请求公用一个OkHttpClient⭐⭐⭐
Stars: ✭ 25 (-98.73%)
Mutual labels:  retrofit, okhttp, retrofit2, okhttp3
Mvpframes
整合大量主流开源项目并且可高度配置化的 Android MVP 快速集成框架,支持 AndroidX
Stars: ✭ 100 (-94.9%)
Mutual labels:  okhttp, mvparms, retrofit2
iMoney
iMoney 金融项目
Stars: ✭ 55 (-97.2%)
Mutual labels:  okhttp, retrofit2, okhttp3
Mvparms
⚔️ A common architecture for Android applications developing based on MVP, integrates many open source projects, to make your developing quicker and easier (一个整合了大量主流开源项目高度可配置化的 Android MVP 快速集成框架).
Stars: ✭ 10,146 (+417.39%)
Mutual labels:  mvparms, retrofit2, arms
Wanandroid
🐔🏀【停止维护,已使用Jetpack+Mvvm重构】根据鸿神提供的WanAndroid开放Api来制作的产品级玩安卓App,采用Kotlin语言,基于Material Design+AndroidX +MVP+RxJava+Retrofit等框架开发,注释超详细,方便大家练手
Stars: ✭ 674 (-65.63%)
Mutual labels:  okhttp, mvparms, retrofit2
Mvvmarms
Android MVVM Architecture Components based on MVPArms and Android Architecture Components.
Stars: ✭ 425 (-78.33%)
Mutual labels:  okhttp3, mvparms, retrofit2
Easyhttp
Android 网络请求框架,简单易用,so easy
Stars: ✭ 423 (-78.43%)
Mutual labels:  okhttp, retrofit, retrofit2
Androidproject
Android 技术中台,但愿人长久,搬砖不再有
Stars: ✭ 4,398 (+124.27%)
Mutual labels:  okhttp3, mvparms, retrofit2
Armscomponent
📦 A complete android componentization solution, powered by MVPArms (MVPArms 官方快速组件化方案).
Stars: ✭ 1,664 (-15.15%)
Mutual labels:  mvparms, retrofit2, arms
Mvvmhabit
goldze: 本人喜欢尝试新的技术,以后发现有好用的东西,我将会在企业项目中实战,没有问题了就会把它引入到MVVMHabit中,一直维护着这套框架,谢谢各位朋友的支持。如果觉得这套框架不错的话,麻烦点个 star,你的支持则是我前进的动力!
Stars: ✭ 6,789 (+246.2%)
Mutual labels:  okhttp, retrofit, retrofit2
Livedata Call Adapter
A simple LiveData call adapter for retrofit
Stars: ✭ 119 (-93.93%)
Mutual labels:  okhttp, okhttp3, retrofit
Androidautosize
🔥 A low-cost Android screen adaptation solution (今日头条屏幕适配方案终极版,一个极低成本的 Android 屏幕适配方案).
Stars: ✭ 12,059 (+514.94%)
Mutual labels:  mvparms, arms
Androidstarter
A sample Android app using the MVP architecture.
Stars: ✭ 140 (-92.86%)
Mutual labels:  okhttp3, retrofit2
Bilisoleil Kotlin
An unofficial bilibili client for android --kotlin+rxjava2+mvp+okhttp3+retrofit2+dagger2
Stars: ✭ 139 (-92.91%)
Mutual labels:  okhttp3, retrofit2
Todo
简洁清爽的Todo清单工具❤️ (MVP+okhttp3+retrofit+gson)
Stars: ✭ 93 (-95.26%)
Mutual labels:  okhttp3, retrofit2
Rxapp
Stars: ✭ 108 (-94.49%)
Mutual labels:  okhttp3, retrofit2
Dagger2
Kotlin Dagger2 example project
Stars: ✭ 145 (-92.61%)
Mutual labels:  okhttp, retrofit2

RetrofitUrlManager

Jcenter Build Status Android Arsenal API License Author QQ-Group

Let Retrofit support multiple baseUrl and can be change the baseUrl at runtime.

中文说明

Overview

overview

Notice

Framework analysis 1

Framework analysis 2

More complete sample

Download

 implementation 'me.jessyan:retrofit-url-manager:1.4.0'

Usage

Initialize

 // When building OkHttpClient, the OkHttpClient.Builder() is passed to the with() method to initialize the configuration
 OkHttpClient = RetrofitUrlManager.getInstance().with(new OkHttpClient.Builder())
                .build();

Step 1

 public interface ApiService {
     @Headers({"Domain-Name: douban"}) // Add the Domain-Name header
     @GET("/v2/book/{id}")
     Observable<ResponseBody> getBook(@Path("id") int id);
}

Step 2

 // You can change BaseUrl at any time while App is running (The interface that declared the Domain-Name header)
 RetrofitUrlManager.getInstance().putDomain("douban", "https://api.douban.com");

If you want to change the global BaseUrl:

 // BaseUrl configured in the Domain-Name header will override BaseUrl in the global setting
 RetrofitUrlManager.getInstance().setGlobalDomain("your BaseUrl");

About Me

License

 Copyright 2017, jessyan

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
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].