Swiftpack.co - jghg02/JNetworking as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by jghg02.
jghg02/JNetworking 0.0.8
Networking Layer Swift Package
⭐️ 6
🕓 2 years ago
iOS
.package(url: "https://github.com/jghg02/JNetworking.git", from: "0.0.8")

JNetwork

iOS iOS

This library provee all the necessary logic to make a request to any API from your application.

Installation

Add JNetwork Client as a dependency through Xcode or directly to Package.swift:

.package(url: "https://github.com/jghg02/JNetworking", branch: "master")

Usage

GET request with no expected success or error response object types.

import JNetworking

let client = JNWebClient<JNEmpty,JNEmpty>()
let request = JNRequest(url: URL(string: "http://API-URL")!)
client.request(request: request) { result in
    switch result {
    case .success(let data):
      print(data)
    case .failure(let error):
       print(error)
                
    }
}

Important

I had created a new NetWork Layer with async await. This is the link of the repo -> https://github.com/jghg02/NET

GitHub

link
Stars: 6
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Related Packages

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics