FDANetwork is a Swift 5.8 library for making network requests. It provides a simple and easy-to-use API for sending HTTP requests and handling responses.
Add this SPM dependency to your project:
https://github.com/Sfresneda/FDANetwork
Here's an example of how to use FDANetwork to send a GET request:
import FDANetwork
let executor = NetworkRequestsExecutor(session: URLSession.shared))
let baseUrl = "https://jsonplaceholder.typicode.com"
let getRequest = FDARequest.baseUrl(baseUrl).get("posts")
do {
let response: SomeCodableModel = try await executor.execute(request: getRequest)
// do something with your response
} catch {
// handle error
}
This project is licensed under the Apache License - see the LICENSE file for details
Sergio Fresneda - sfresneda