Swiftpack.co - SwiftSimpers/SwiftFetch as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by SwiftSimpers.
SwiftSimpers/SwiftFetch v0.9.0
Fetch-like API implementation for Swift for asynchronous HTTP requests with the new async/await syntax.
⭐️ 11
🕓 2 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/SwiftSimpers/SwiftFetch.git", from: "v0.9.0")

Swift Fetch

Swift 5.5 Platforms: iOS, macOS, tvOS, watchOS Swift Package Manager Compatible

Fetch-like API implementation for Swift for asynchronous HTTP requests with the new async/await syntax.

Usage

import SwiftFetch

let response = try await fetch("https://google.com")
print(try await response.text())

Wanna stream? It's easy!

import SwiftFetch

let response = try await fetch("https://url.to/something")
    
for try await byte in response.body {
  // ...
}

Contributing

You're always welcome to contribute!

  • We use SwiftFormat for formatting.

License

Check LICENSE for more info.

Copyright 2021-present (c) DjDeveloperr, Helloyunho

GitHub

link
Stars: 11
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

v0.9.0
2 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics