Write clean, concise and declarative network code relying on URLSession, with the power of RxSwift. Inspired by Retrofit.

Overview
Comments
  • Demo App using ReactiveAPI

    Demo App using ReactiveAPI

    I thought the best way to show the ReactiveAPI potential is to make a demo app with it from scratch, with the bare minimum to show something to the user. I used swapi.co open APIs and only ReactiveAPI as dependency. Updated Readme as well with some examples taken from the demo.

    opened by gotev 2
  • ReactiveAPIDemo adopts SPM & xcodegen

    ReactiveAPIDemo adopts SPM & xcodegen

    • ReactiveAPIDemo adopts SPM & xcodegen
    • Referenced SPM package --> url: https://github.com/sky-uk/ReactiveAPI.git branch: spm ReactiveAPIDemo is not visible in Xcode navigator of ReactiveAPI project

    image

    opened by skychiarottoa 0
  • Swift Package Manager

    Swift Package Manager

    • Reactive API can be imported using SPM & Carthage
    • No demo example (A fresh new demo&/prj can be added once this branch is merged)
    • TODO: tests refactoring with SkyTestFoundation
    opened by skydemarcoa 0
  • inject existing token when possible

    inject existing token when possible

    inject existing token when failed requests don't have a token or hav a token different from the current one. This reduces requests made to the backend. Updated HTTPStubs implementation.

    opened by gotev 0
  • Introduced ReactiveAPITokenAuthenticator

    Introduced ReactiveAPITokenAuthenticator

    Current TokenAuthenticationDemo token renew was broken when trying to do multiple symultaneous requests, which resulted in multiple token renew requests when each one of the original requests got 401 from server.

    To solve this and to help library users write simple token-based authenticators, the new ReactiveAPITokenAuthenticator has been introduced.

    To ease debugging, an optional ReactiveAPITokenAuthenticatorLogger can be provided.

    opened by gotev 0
  • Query string type converter

    Query string type converter

    It often happens to pass complex data types as query string (e.g. Date) and to have the need of doing custom string representation of the objects. This adds that possibility.

    opened by gotev 0
  • Fix array response types

    Fix array response types

    When declaring an API with the following signature

    func myAPI() -> Single<[MyDataType]>
    

    Xcode won't compile complaining about "ambiguous reference". This is because:

        func request<D: Decodable>(_ method: ReactiveAPIHTTPMethod = .get,
                                   url: URL,
                                   headers: [String: Any?]? = nil,
                                   queryParams: [String: Any?]? = nil,
                                   bodyParams: [String: Any?]? = nil) -> Single<[D]>
    

    conflicts with

        func request<D: Decodable>(_ method: ReactiveAPIHTTPMethod = .get,
                                   url: URL,
                                   headers: [String: Any?]? = nil,
                                   queryParams: [String: Any?]? = nil,
                                   bodyParams: [String: Any?]? = nil) -> Single<D>
    

    because[D] is the same as D when D: Decodable

    Fixed by removing the redundant functions!

    opened by gotev 0
  • Apple combine implementation

    Apple combine implementation

    Yesterday Apple unveiled Combine, an Rx Like framework for iOS 13+ and macOS 10.15+.

    https://developer.apple.com/documentation/combine/publisher

    This is a game changer and can be a huge benefit for ReactiveAPI looking forward.

    opened by gotev 0
  • Find more elegant way to call baseURL

    Find more elegant way to call baseURL

    Up to this point if we set baseUrl = https://www.server.com/api and we have an API which needs to call the baseURL, we need to write a func like this:

    func getRoot() -> Single<Root> {
        return request(url: absoluteURL(""))
    }
    

    absoluteURL("") is really ugly, we should find a more elegant way

    enhancement 
    opened by gotev 0
Releases(1.13.5)
Owner
Sky UK Ltd
Sky UK Ltd
Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application.

Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application. Install Carthage

Ronan Rodrigo Nunes 89 Dec 26, 2022
GitHub iOS client in RxSwift and MVVM-C clean architecture

GitHub iOS client in RxSwift and MVVM-C clean architecture. FlutterHub - Flutter version available at an early stage KotlinHub - Android version is co

Khoren Markosyan 2.7k Jan 7, 2023
A new, clean and lean network interface reachability library written in Swift.

Reachability A new, clean and lean network interface reachability library written in Swift. Remarks Network reachability changes can be monitored usin

Alecrim 7 Aug 8, 2022
A Concise HTTP Framework in Swift

NetKit A Concise HTTP Framework in Swift. Requirements NetKit requires Swift 5.0 and Xcode 10.2 Installation CocoaPods You can use CocoaPods to integr

Aziz Uysal 4 Apr 23, 2019
Easy and lightweight network layer for creating different set of network requests like GET, POST, PUT, DELETE customizable with coders conforming to TopLevelDecoder, TopLevelEncoder

Easy and lightweight network layer for creating different set of network requests like GET, POST, PUT, DELETE customizable with coders conforming to TopLevelDecoder, TopLevelEncoder

Igor 2 Sep 16, 2022
A network extension app to block a user input URI. Meant as a network extension filter proof of concept.

URIBlockNE A network extension app to block a user input URI. Meant as a network extension filter proof of concept. This is just a research effort to

Charles Edge 5 Oct 17, 2022
Say goodbye to the Fat ugly singleton Network Manager with this Network Layer

MHNetwork Protocol Oriented Network Layer Aim to avoid having bloated singleton NetworkManager Philosophy the main philosophy behind MHNetwork is to h

Mohamed Emad Hegab 19 Nov 19, 2022
NWReachability - a pure Swift library for monitoring the network connection of iOS devices using Apple's Network framework.

NWReachability is a pure Swift library for monitoring the network connection of iOS devices using Apple's Network framework.

null 4 Dec 2, 2022
A reactive library for using URLSession

Reactive wrapper for URLSession using Combine. At its core, the library consist of the NetworkServiceClient protocol along with a minimal implementation NetworkService.

MFB Technologies, Inc. 2 Nov 20, 2022
To practice URLSession to fetch json data from open weather API

⛅️ weatherApp-iOS-practice ?? 기능 상세 도시 이름을 입력하면 현재 날씨 정보를 가져와 화면에 표시되게 만들어야 합니다

Jacob Ko 0 Dec 18, 2021
GeminiProtocol - URLSession support for the Gemini Protocol

GeminiProtocol Network.Framework and URLSession support for the Gemini Protocol

Izzy 3 Feb 16, 2022
The civilized way to write REST API clients for iOS / macOS

The elegant way to write iOS / macOS REST clients Drastically simplifies app code by providing a client-side cache of observable models for RESTful re

Bust Out 2.2k Nov 20, 2022
Declarative and Reactive Networking for Swift.

Squid Squid is a declarative and reactive networking library for Swift. Developed for Swift 5, it aims to make use of the latest language features. Th

Oliver Borchert 69 Dec 18, 2022
Deal with query items, HTTP headers, request body and more in an easy, declarative way

Reusable system for complex URL requests with Swift. Deal with query items, HTTP headers, request body and more in an easy, declarative way. Check out our engineering blog to learn more!

Parable Health 19 Sep 5, 2022
Simple REST Client based on RxSwift and Alamofire.

RxRestClient Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 10.0+ tvOS 10.

STDev 16 Nov 19, 2022
iOS Todo Application using RxSwift and ReactorKit

RxTodo RxTodo is an iOS application developed using ReactorKit. This project is for whom having trouble with learning how to build a RxSwift applicati

Suyeol Jeon 1.3k Jan 3, 2023
Simple REST Client based on RxSwift and Alamofire.

RxRestClient Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 10.0+ tvOS 10.

STDev 16 Nov 19, 2022
Meet Corvus, the first strongly declarative server-side framework.

Corvus Corvus is the first truly declarative server-side framework for Swift. It provides a declarative, composable syntax which makes it easy to get

null 42 Jun 29, 2022
A testable RxSwift wrapper around MultipeerConnectivity

A testable RxSwift wrapper around MultipeerConnectivity

RxSwift Community 69 Jul 5, 2022