Network

0.1.0

🕸️ Output and Input for remote URLs using REST
0xOpenBytes/Network

What's New

0.1.0

2023-03-07T00:38:33Z

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

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)

Description

  • Swift Tools 5.7.0
View More Packages from this Author

Dependencies

  • o2.1.0
Last updated: Sun Mar 17 2024 00:57:56 GMT-0900 (Hawaii-Aleutian Daylight Time)