Skip to content

Releases: ReidoBoss/SwiftNetworkKit

1.0.2

07 Oct 01:44

Choose a tag to compare

Full Changelog: v1.0.1...1.0.2

v1.0.1

06 Oct 07:48

Choose a tag to compare

🛠 Improvements

  • Resolved compiler warnings for cleaner builds and improved code quality.

v1.0.0

06 Oct 07:42

Choose a tag to compare

Looking at your SNKDataRequest class, here are release notes for version 1.0.0:

SwiftNetworkKit v1.0.0 Release Notes

🎉 Initial Release

We're excited to announce the first stable release of SwiftNetworkKit! This networking library provides a modern, type-safe, and fluent API for making HTTP requests in Swift applications.

✨ Core Features

SNKDataRequest - Fluent HTTP Request Builder

  • Method Chaining API: Build HTTP requests with an intuitive, readable syntax
  • Thread-Safe: Built with @unchecked Sendable for concurrent environments

Flexible Configuration

  • HTTP Methods: Support for GET, POST, PUT, DELETE, and other HTTP methods
  • Custom Headers: Add individual headers or set multiple headers at once
  • Query Parameters: Incremental or bulk query parameter configuration
  • Request Body: Support for raw Data body content
  • Custom Decoders: Configurable JSON decoding with custom JSONDecoder instances

Smart Response Handling

  • HTTP Status Validation: Built-in status code validation and error handling
  • Type-Safe Decoding: Automatic JSON decoding to your custom types
  • Structured Error Handling: Comprehensive error types for different failure scenarios

Developer-Friendly APIs

Incremental Configuration

let request = SNKDataRequest(url, urlSession: session)
    .addHeader("Content-Type", value: "application/json")
    .addHeader("Authorization", value: "Bearer \(token)")
    .addQueryParams(["page": "1", "limit": "20"])
    .addQueryParams(["sort": "name"])

Bulk Configuration

let request = SNKDataRequest(url, urlSession: session)
    .headers([
        "Content-Type": "application/json",
        "Authorization": "Bearer \(token)"
    ])
    .queryParams([
        "page": "1",
        "limit": "20",
        "search": "swift"
    ])

🛠 Technical Specifications

  • Minimum iOS Version: iOS 13.0+
  • Swift Version: Swift 5.0+
  • Frameworks: Built on Foundation and Combine
  • Architecture: Thread-safe, value-oriented design
  • Memory Management: Automatic reference counting with proper lifecycle management

📋 API Reference

Core Methods

  • decoder(_:) - Configure JSON decoder
  • headers(_:) - Set HTTP headers
  • addHeader(_:value:) - Add individual header
  • queryParams(_:) - Set query parameters
  • addQueryParams(_:) - Add query parameters incrementally
  • body(_:) - Set request body data

Validation & Error Handling

  • Built-in HTTP status code validation
  • Structured error types (SNKError)
  • Automatic response validation through SNKDataResult

🚀 Getting Started

import SwiftNetworkKit

// Basic GET request
let request = SNKDataRequest(url, urlSession: .shared)
    .headers(["Authorization": "Bearer \(token)"])
    .queryParams(["page": "1"])

// POST request with body
let request = SNKDataRequest(url, urlSession: .shared)
    .addHeader("Content-Type", value: "application/json")
    .body(jsonData)

🎯 What's Next

This initial release provides the foundation for type-safe HTTP networking in Swift. Future versions will include:

  • Enhanced response handling with status code access
  • Support for Codable objects in request bodies
  • Advanced authentication mechanisms
  • Comprehensive test coverage improvements

📝 Notes

  • This version focuses on the core request building functionality
  • Response execution and advanced decoding features are in active development
  • Comprehensive documentation and examples are available in the repository

Full Changelog: Initial release - no previous versions to compare

Contributors: Stephen T. Sagarino Jr. (@ReidoBoss)