Network Layer with async and await

NET

This library provee all the necessary logic to make a request to any API from your application. This is an implementation using async and await

Installation

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

.package(url: "https://github.com/jghg02/NET", branch: "main")

Usage

    let client = NETClient<[Recipes], RegistrationError>()
    let request = NETRequest(url: URL(string: "https://example.com")!)
    switch await client.request(request) {
    case .success(let data):
        print(data)
    case .failure(let error):
        print("Error")
        print(error.localizedDescription)
    }

GitHub

View Github