HTTPClient is a Swift library designed to abstract away access to Alamofire. The main purpose of the HTTPClient component is to encapsulate endpoints description inside some network abstraction layer to avoid calling Alamofire directly. Enums are used to define enpoints. This allows to make compile-time checks for correct API endpoint accesses.
- iOS 15.0+
- Xcode 16.0+
- Swift 5.0+
To integrate HTTPClient into your Xcode project with CocoaPods, specify it in your Podfile
:
pod 'Shakuro.HTTPClient'
Then, run the following command:
$ pod install
If you prefer not to use CocoaPods, you can integrate Shakuro.HTTPClient simply by copying it to your project.
- Create a couple of endpoints by adopting
HTTPClientAPIEndPoint
protocol. - Create responses parsers by adopting
HTTPClientParser
protocol. - Create new instance of
HTTPClient
class. - Start your HTTP request by calling
.sendRequest
. You should use completions to handle parsed results.
Take a look at the HTTPClient_Example for more info.
Shakuro.HTTPClient is released under the MIT license. See LICENSE for details.
Explore our expertise in Native Mobile Development and iOS Development.
If you need professional assistance with your mobile or web project, feel free to contact our team