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
⭐️ 3
🕓 1 year 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)
                
    }
}

GitHub

link
Stars: 3
Last commit: 5 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Related Packages

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