Giter Club home page Giter Club logo

http_client's Introduction

๐ŸŒ๐Ÿšœ (Combine)HTTPClient

Swift 5.2 Swift Package Manager @_marinofelipe

Simple HTTPClient(s) built on top of URLSession.

Motivation

There are a lot of great open sourced and community-driven third-party networking libraries, such as Moya and Alamofire. They are quite powerfull, can speed up development, and help you on different and more complex ways of networking.

For some use cases though I like the idea of something simpler, without the need to rely on yet another third party dependency. It's also a lot of fun to learn more about networking ๐Ÿ˜.

This project is an example on how to wrap URLSession, and provide an easy to use but still robust and well-tested API. Same concept can be applied over any other SDKs, even when using a third-party library, since it's always a good practice to do not expose such logic to the outside world, making it easier to maintain and swap implementation in the future.

Content

It comes with these array of libraries: [HTTPClient, CombineHTTPClient, CombineHTTPClientTestSupport]

Examples on how to use can them can taken seen in the unit tests ๐Ÿ˜‰. Both clients depends on HTTPClientCore, which contains shared helpers and common types.

Installation

Swift Package Manager

If you want to try it out in a project that uses SPM, just add it as a dependency in your Package.swift:

dependencies: [
  .package(url: "https://github.com/marinofelipe/http_client.git", from: "0.0.1")
]

License

All modules are released under the MIT license. See LICENSE for details.

http_client's People

Contributors

marinofelipe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.