All Projects → FutureHere → EasyRetrofit

FutureHere / EasyRetrofit

Licence: other
an encapsulation for Retrofit2.1

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to EasyRetrofit

eyepetizer kotlin
一款仿开眼短视频App,分别采用MVP、MVVM两种模式实现。一、组件化 + Kotlin + MVP + RxJava + Retrofit + OkHttp 二、组件化 + Kotlin + MVVM + LiveData + DataBinding + Coroutines + RxJava + Retrofit + OkHttp
Stars: ✭ 83 (+144.12%)
Mutual labels:  retrofit2
DailyBugle
📰Modern MVVM Android application following single activity architecture which fetches news from 🕷️ news API. this repository contains some best practices ⚡ of android development
Stars: ✭ 17 (-50%)
Mutual labels:  retrofit2
LifeHelper
我的毕业设计,功能还是比较完善的
Stars: ✭ 40 (+17.65%)
Mutual labels:  retrofit2
AndroidMultiModuleCleanArchTemplate
An Android kotlin project template with Dagger2, Rx and Architecture Components
Stars: ✭ 33 (-2.94%)
Mutual labels:  retrofit2
Assume
Easy Response Mocking for Retrofit using annotations
Stars: ✭ 25 (-26.47%)
Mutual labels:  retrofit2
framework
Aplus Full-Stack Framework
Stars: ✭ 172 (+405.88%)
Mutual labels:  http-client
auto-value-querymap
AutoValue Extension to add QueryMap generation (Retrofit 2)
Stars: ✭ 14 (-58.82%)
Mutual labels:  retrofit2
requests-rs
Rust HTTP client library styled after awesome Python requests
Stars: ✭ 37 (+8.82%)
Mutual labels:  http-client
rxjava2 retrofit2
rxjava2+retrofit2 网络封装
Stars: ✭ 19 (-44.12%)
Mutual labels:  retrofit2
photon
Fast and light image loading library based on kotlin
Stars: ✭ 20 (-41.18%)
Mutual labels:  retrofit2
NoMoneyTrip
[SKT/한국관광공사] 2020 스마트 관광 앱 개발 공모전 '무전여행' 앱
Stars: ✭ 28 (-17.65%)
Mutual labels:  retrofit2
lhs
⚛️ REST services accelerator: Rails gem providing an easy, active-record-like interface for http (hypermedia) json services
Stars: ✭ 130 (+282.35%)
Mutual labels:  http-client
restofus
Restofus - a cross-platform (REST) API client.
Stars: ✭ 18 (-47.06%)
Mutual labels:  http-client
HTTP4J
Simple & Lightweight Java 8 HTTP Client
Stars: ✭ 40 (+17.65%)
Mutual labels:  http-client
AndroidCleanArchitecture
Android Project with clean android architecture contain Dagger, Retrofit, Retrofit, Android archtecture components, LiveData with MVVM architecture
Stars: ✭ 22 (-35.29%)
Mutual labels:  retrofit2
http
Tiny, embeddable HTTP client with simple API for the browser
Stars: ✭ 21 (-38.24%)
Mutual labels:  http-client
relay
Relay lets you write HTTP requests as easy to read, structured YAML and dispatch them easily using a CLI. Similar to tools like Postman
Stars: ✭ 22 (-35.29%)
Mutual labels:  http-client
waspy
WASP framework for Python
Stars: ✭ 43 (+26.47%)
Mutual labels:  http-client
MVVM-Demo
This demo for MVVM Design pattern for android
Stars: ✭ 20 (-41.18%)
Mutual labels:  retrofit2
TDDWeatherApp
Android App trying to apply TDD and using MVVM, Kotlin Coroutines
Stars: ✭ 38 (+11.76%)
Mutual labels:  retrofit2

使用教程

一、初始化

   在Applcation里面初始化ApiManager:    ApiManager.getInstance().init(this);

   ApiManager是连接easyretrofit与app的中间类,建议直接拷贝代码至项目中类  

二、使用

NetWorkRequest.getInstance().asyncNetWork(tag, requestCode, ApiManager.getInstance().getApiService().login(), 
               new NetworkResponse<ResponseLoginEntity>() {
        @Override
        public void onDataReady(ResponseLoginEntity response) {
            
        }

        @Override
        public void onDataError(int requestCode, int responseCode, String message) {

        }

   });  
参数解析:  
* tag String类型用于区分不用页面的请求  
* requestCode int类型 用于区分相同页面的不通请求  
* Call Retrofit动态代理 泛型为返回实体 必须继承BaseResponseEntity  
* NetworkResponse 接口回调 泛型为返回实体 必须继承BaseResponseEntity(如有特殊需要可修改源码)

NetWorkRequest.getInstance().cancelCall(String TAG, Integer code)   取消某一TAG的某一请求
NetWorkRequest.getInstance().cancelTagCall(String TAG)}   取消某一TAG所有请求

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].