A (probably very naïve) attempt at implementing the dataTaskPublisher(for: URLRequest) extension on URLSession mentioned in WWDC 2019, Session 712. You can see a demo of it at https://developer.apple.com/videos/play/wwdc2019/712/ around 20:32.
There’s a simple demo include in the repository. Change to Demos/macOS/SimpleDemo directory then use swift build to build it and swift run to run it. You should be treated to glorious HTML text on your terminal.
IDZSwiftDataTaskPublisher
A (probably very naïve) attempt at implementing the
dataTaskPublisher(for: URLRequest)
extension onURLSession
mentioned in WWDC 2019, Session 712. You can see a demo of it at https://developer.apple.com/videos/play/wwdc2019/712/ around 20:32.There’s not much to using it:
This example downloads and prints the HTML for http://example.com.
Using the Package
The package supports the Swift Package Manager. Just add
to your
Package.swift
Building the Demo Program
There’s a simple demo include in the repository. Change to
Demos/macOS/SimpleDemo
directory then useswift build
to build it andswift run
to run it. You should be treated to glorious HTML text on your terminal.