This library provee all the necessary logic to make a request to any API from your application.
Add JNetwork Client as a dependency through Xcode or directly to Package.swift:
.package(url: "https://github.com/jghg02/JNetworking", branch: "master")
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)
}
}
I had created a new NetWork Layer with async await. This is the link of the repo -> https://github.com/jghg02/NET