SwiftHTTP is a DSL that offers a declarative spin to networking and a simpler way to interact with the built in URLSession. This package offers a similarity in syntax to SwiftUI with the intention of making it very easy to read and write network requests just as views are within the bounds of SwiftUI.
SwiftHTTP
can be installed via SPM
.
In Xcode go to File > Swift Packages > Add Package Dependency...
and add https://github.com/dylanjrafferty/SwiftHTTP
First import the package to your file
import SwiftHTTP
Once the package has been imported, you can use it to create network requests with a declarative and SwiftUI like feel.
All examples of use cases can be viewed here within the sample repo https://github.com/dylanjrafferty/swifthttp-example-app