Contents

0xOpenBytes/Network

🕸️ Output and Input for remote URLs using REST

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)

Package Metadata

Repository: 0xOpenBytes/Network

Homepage: https://0xopenbytes.github.io/Network/

Stars: 2

Forks: 0

Open issues: 0

Default branch: main

Primary language: swift

License: MIT

Topics: async-await, datatask, get, headers, network, post, rest, swift, url, urlsession

README: README.md