NetworkKit

1.0.4

Powerful network layer seamlessly integrating Combine Framework, Async/Await, and Closures.
sabapathy7/NetworkKit

What's New

Added Async/await

2024-03-07T02:01:47Z
  • Added new method using Async/await - Structured Concurrency
  • Updated the README.md file and added projects used for reference

NetworkKit

Elevate your iOS app's connectivity with NetworkKit – a powerful network layer seamlessly integrating Combine Framework, Async/Await, and Closures.

The full Tutorial can be found on Medium

Please take a look at the Example usage of NetworkKit

GitHub Repos

iOSNetworkExample

SOLID Principles

Force Update App

Features

  • Combine Framework Integration: Leverage the power of Combine to streamline asynchronous operations and handle complex data flows effortlessly.

  • Async/Await Support: Embrace modern Swift programming with async/await, simplifying asynchronous code and making your networking logic cleaner and more readable.

  • Closures for Flexibility: Customize your networking calls with closures, providing a flexible and modular approach to handle responses, errors, and more.

Examples

public protocol Networkable {
   func sendRequest<T: Decodable>(endpoint: EndPoint) async throws -> T
   func sendRequest<T: Decodable>(endpoint: EndPoint, resultHandler: @escaping (Result<T, NetworkError>) -> Void)
   func sendRequest<T: Decodable>(endpoint: EndPoint, type: T.Type) -> AnyPublisher<T, NetworkError>
}

Installation

Simply add NetworkKit to your project using Swift Package Manager - https://github.com/sabapathyk7/NetworkKit.git

Contributions

Feel free to submit issues or pull requests to enhance the functionality of NetworkKit.

Connect with Me

Stay updated on the latest features and releases by following me on LinkedIn.

Description

  • Swift Tools 5.6.0
View More Packages from this Author

Dependencies

  • None
Last updated: Tue Oct 22 2024 22:12:31 GMT-0900 (Hawaii-Aleutian Daylight Time)