/KNetworking

Primary LanguageSwiftMIT LicenseMIT

KNetworking

Swift Platforms SPM Twitter Linkedin

Many times I use this structure for network layer of my own built applications. I came into a decision to make a package out of it.

It streamlines sending HTTP requests with simple structure, beneficial for small tasks and projects.

Features

  • Send HTTP data requests.
  • Support different HTTP Methods.
  • Support url parameters.
  • Support http body.
  • Support http headers.
  • Support all status codes.
  • Support different routes and gateways
  • build parameters, body and headers easily with @BodyBuilder and @KeyValueBuilder.

Requirements

Platform Minimum Swift Version Installation Status
iOS 13.0+ 5.8 SPM Tested
macOS 10.15+ 5.8 SPM Tested
macCatalyst 13+ 5.8 SPM Tested
watchOs 6.0+ 5.8 SPM NotTested
tvOS 13.0+ 5.8 SPM NotTested

Installation

SPM

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Once you have your Swift package set up, adding KNetworking as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/kiarashvosough1999/KNetworking.git", .upToNextMajor(from: "1.0.0"))
]

Contributors

Feel free to share your ideas or any other problems. Pull requests are welcomed.

License

KNetwork is released under an MIT license. See LICENSE for more information.