Swiftpack.co - 0xOpenBytes/Network as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by 0xOpenBytes.
0xOpenBytes/Network 0.1.0
🕸️ Output and Input for remote URLs using REST
⭐️ 2
🕓 1 year ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/0xOpenBytes/Network.git", from: "0.1.0")

Network

Network is a convenience typealias for o.url that represents network access. o.url is a group of functions in the o module that provides network access and manipulation operations.

Usage

To use Network, simply import Network and use the Network typealias in your code:

import Network

// Get data from a URL
let data = try await Network.get(url: URL(string: "https://example.com/data.json")!)

// Post data to a URL
let postData = "Hello, world!".data(using: .utf8)!
try await Network.post(url: URL(string: "https://example.com/post")!, body: postData)

GitHub

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

Release Notes

0.1.0
1 year ago

Network

Network is a convenience typealias for o.url that represents network access. o.url is a group of functions in the o module that provides network access and manipulation operations.

Usage

To use Network, simply import Network and use the Network typealias in your code:

import Network

// Get data from a URL
let data = try await Network.get(url: URL(string: "https://example.com/data.json")!)

// Post data to a URL
let postData = "Hello, world!".data(using: .utf8)!
try await Network.post(url: URL(string: "https://example.com/post")!, body: postData)

Full Changelog: https://github.com/0xLeif/Network/commits/0.1.0

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