NetNewsWire/Frameworks/RSWeb/README.md

19 lines
1.0 KiB
Markdown
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# RSWeb
RSWeb is utility code — all Swift — for downloading things from the web. It builds a Mac framework and an iOS framework.
#### Easy way
See `OneShotDownload` for a top-level `download` function that takes a URL and a callback. The callback takes `Data`, `URLResponse`, and `Error` parameters. Its easy.
#### Slightly less easy way
See `DownloadSession` and `DownloadSessionDelegate` for when youre doing a bunch of downloads and you need to track progress.
#### Extras
`HTTPConditionalGetInfo` helps with supporting conditional GET, for when youre downloading things that may not have changed. See [HTTP Conditional Get for RSS Hackers](http://fishbowl.pastiche.org/2002/10/21/http_conditional_get_for_rss_hackers/) for more about conditional GET. This is especially critical when polling for changes, such as with an RSS reader.
`MimeType` could use expansion, but is useful for some cases right now.
`MacWebBrowser` makes it easy to open a URL in the default browser. You can specify whether or not to open in background.