Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anbalagand/eaglenet
Simple lightweight networking layer written on top of URLSession. This will provide a clean, separate layer for networking.
https://github.com/anbalagand/eaglenet
async async-await fileupload http https interceptor ios json macos networking parsing swift tvos urlsession
Last synced: 11 days ago
JSON representation
Simple lightweight networking layer written on top of URLSession. This will provide a clean, separate layer for networking.
- Host: GitHub
- URL: https://github.com/anbalagand/eaglenet
- Owner: AnbalaganD
- License: mit
- Created: 2024-08-19T14:29:28.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-18T06:12:06.000Z (2 months ago)
- Last Synced: 2024-11-07T16:48:11.913Z (about 2 months ago)
- Topics: async, async-await, fileupload, http, https, interceptor, ios, json, macos, networking, parsing, swift, tvos, urlsession
- Language: Swift
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This library aims to provide a simple and elegant approach to writing network requests. It's designed to be lightweight, adding a thin layer on top of `URLSession` without excessive engineering overhead.
#### Our primary objectives are:
- **Lightweight networking library:** Keep the library small and efficient.
- **Easy to maintain:** Prioritize clear code and modular design for maintainability.
- **Beginner friendly:** Make the library accessible to developers of all levels.
- **Well documented:** Provide comprehensive documentation to guide usage.
- **Customizable and testable:** Allow for flexibility and ensure code quality through testing.Currently, this library supports basic HTTP data requests (`GET`, `POST`, `PUT`, `DELETE`) and includes a small file upload feature using `multipart/form-data`. These capabilities address the majority of network communication needs in most applications.
For detailed information on feature status, please refer to the [Roadmap](https://github.com/AnbalaganD/EagleNet/wiki/Roadmap) file
### Swift Package manager (SPM) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FAnbalaganD%2FEagleNet%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/AnbalaganD/EagleNet)
EagleNet is available through [SPM](https://github.com/AnbalaganD/EagleNet). Use below URL to add as a dependency
```swift
dependencies: [
.package(url: "https://github.com/AnbalaganD/EagleNet", .upToNextMajor(from: "1.0.0"))
]
```## Usage
```swift
import EagleNetstruct User: Decodable {
let name: String
let profile: URL?
}let response: User = try await EagleNet.networkService.execute(
DataRequest(url: "https://example.com/user/1")
)```
## Author
[Anbalagan D](mailto:[email protected])
## License
EagleNet is available under the MIT license. See the [LICENSE](LICENSE) file for more info.