Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 18.2 ('Listbox Drawing')
Instant purchase and download via GumRoad!

FEATURE

More Fun with Comics

Upgrading Comic Downloader to Work with URLConnection and HTTP 1.1

Issue: 18.2 (March/April 2020)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 17,262
Starting Page Number: 12
Article Number: 18202
Resource File(s):

Download Icon project18202.zip Updated: 2020-03-02 10:36:09

Related Link(s): None

Excerpt of article text...

I really hate it when code I've been using for years suddenly stops working. Usually this happens because of updates—either to Xojo or my operating system—so I'm careful about changing either of those. But when you're working with the Internet, specially HTTP, it can happen just because the Internet itself was changed.

Eight years ago (in xDev 10.1) I published an article about my Comic Downloader project ("Fun With Comics"). This is a complex program I wrote that runs each morning. It parses the web pages of several comic sites, extracts the day's comic, and downloads the graphic into a folder on my Dropbox so I can view all my comics at once, with no ads or distractions.

To make this app more robust, I used XojoScripts for the parsing, so I could easily make changes to the program without having to recompile it. In theory, that made the app unlikely to fail since new versions of Xojo wouldn't cause any backward compatibility issues.

This worked great for years. Other than having to tweak some of the scripts occasionally when a site would change their HTML and break my parsing, the app just ran and worked.

Until it didn't.

HTTP 1.1

...End of Excerpt. Please purchase the magazine to read the full article.