[go: up one dir, main page]

Skip to content

jghg02/JNetworking

Repository files navigation

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

About

Networking Layer Swift Package

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages