pprokopowicz / NetworkKit

Repository from Github https://github.compprokopowicz/NetworkKitRepository from Github https://github.compprokopowicz/NetworkKit

NetworkKit

NetworkKit is a simple, easy to use and lightweight netowkring library written in pure Swift. It uses URLSession under the hood.

Platforms

  • iOS 13+
  • macOS 10.15+
  • tvOS 13+
  • watchOS 6+

Installation

Swift Package Manager

in Package.swift add the following:

dependencies: [
    ...
    .package(url: "https://github.com/pprokopowicz/NetworkKit.git", from: "0.6.0")
]

Usage

  • Create a base NetworkEnvironment which will provide base URL for your requests.
  • Create new struct conforming to NetworkRequest protocol.
  • Use NetworkClient to fetch data from the request.

For more detailed example chek out example project.

Todo

  • Rework middleware support.

License

MIT license. See the LICENSE file for details.

About

License:MIT License


Languages

Language:Swift 100.0%