CocoaPods trunk is moving to be read-only. Read more on the blog, there are 15 months to go.

NetworkingSDK 1.0.1

NetworkingSDK 1.0.1

Maintained by Jayant Vishwakarma.



  • By
  • jayantv-coder

NetworkingSDK

A reusable networking layer for all iOS applications using Alamofire.

โœ… Features

  • Generic GET/POST/PUT/DELETE requests
  • Multipart upload
  • File download
  • Codable response handling
  • Error handling
  • CocoaPods support

๐Ÿš€ Installation

pod 'NetworkingSDK', :git => 'https://github.com/yourusername/NetworkingSDK.git'

๐Ÿ”ง Usage

GET Request

NetworkManager.shared.request(
    url: "https://api.example.com/users",
    method: .get,
    responseType: [User].self
) { result in
    // Handle result
}

Upload Image

let imageData = UIImage(named: "profile")!.jpegData(compressionQuality: 0.8)!
let file = MultipartFile(data: imageData, name: "avatar", fileName: "avatar.jpg", mimeType: "image/jpeg")

NetworkManager.shared.upload(
    url: "https://api.example.com/upload",
    parameters: ["userId": "123"],
    files: [file],
    responseType: UploadResponse.self
) { result in
    // Handle result
}

๐Ÿงช Testing

Test cases can be found under Tests/NetworkingSDKTests.swift.

๐Ÿ“„ License

MIT