Skip to content

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

License

Notifications You must be signed in to change notification settings

SwiftSimpers/SwiftFetch

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages