https://github.com/nixzhu/flash
A modern, Swift-native HTTP client library with middleware support and built-in retry mechanisms.
https://github.com/nixzhu/flash
http middleware retry-policy swift
Last synced: 10 months ago
JSON representation
A modern, Swift-native HTTP client library with middleware support and built-in retry mechanisms.
- Host: GitHub
- URL: https://github.com/nixzhu/flash
- Owner: nixzhu
- License: mit
- Created: 2025-06-25T07:32:22.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-06-25T07:50:54.000Z (10 months ago)
- Last Synced: 2025-06-25T08:42:07.096Z (10 months ago)
- Topics: http, middleware, retry-policy, swift
- Language: Swift
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://swiftpackageindex.com/nixzhu/Flash)
[](https://swiftpackageindex.com/nixzhu/Flash)
# Flash
A modern, Swift-native HTTP client library with middleware support and built-in retry mechanisms. Flash provides a clean, async/await-based API for making HTTP requests with powerful customization options.
## Features
- 🚀 **Modern Swift**: Built with async/await and `Sendable` support
- 🔧 **Middleware System**: Intercept and modify requests/responses with custom middleware
- 🔄 **Retry Policies**: Built-in support for fixed delay and exponential backoff retry strategies
- 📝 **Type-Safe**: Strongly-typed request builders with compile-time safety
- 🎯 **Lightweight**: Minimal dependencies, built on top of `URLSession`
- 🔍 **Flexible**: Support for GET, POST, PUT, PATCH and DELETE requests with JSON body handling
## Installation
### Swift Package Manager
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift`compiler.
Once your Swift package is set up, add Flash as a dependency to the `dependencies` value in your `Package.swift` file or to the package list in Xcode.
```swift
dependencies: [
.package(url: "https://github.com/nixzhu/Flash.git", from: "0.3.0"),
]
```
Typically, you will want to depend on the `Flash` target:
```swift
.product(name: "Flash", package: "Flash")
```