Resolving URL System

Post Reply
User avatar
GeorgeMcGinn
Posts: 435
Joined: Sat Sep 10, 2016 6:37 am
My devices: IPad Pro 10.5in
IMac
Linux i386
Windows 7 & 10
Location: Venice, FL
Flag: United States of America
Contact:

Resolving URL System

Post by GeorgeMcGinn »

Hello,

If you have needed to work with files that are produced by URLs, some questions need to be answered before you write your code to read and parse data from it.

Since I do a lot of work with files produced by websites, whether I download them from a link or they are created by executing a CGI Script, I wrote a system that resolves the URL, creates the file I will need to work with, and optionally, create a report that displays line number and the data.

This is important as one of the questions I have is whether when I execute the HTTP URL GET A$ statement, sometimes it creates a file with one record, or many. My Resolve URL.sb program not only creates the file you can use to write and test your code, but it also creates a report file that shows you, by line number, each data record.

My system also will resolve any HTTP errors by producing not only the Error Status Code, but it will take data from the RFC 2616 document and based on the error code, display a detailed report on the error.

You can download from my Dropbox the program, libraries, data file and output from a run I did. The URL from the run I did is in the program so you can run it and recreate the files. Since there are too many files (1 program, 4 libraries, and one input file) I am using Dropbox instead of putting them all here.

The programs are heavily commented, and all the changes you will need to make are to "Resolve URL.sb"

DROPBOX Link:
https://www.dropbox.com/sh/f3mrmmkv8wf0 ... SGCLa?dl=0

I hope you find this a useful App. Since this App is part of the Programmer's Guide I am writing, you are free to use and change it to suit your needs, as it is more of a programmer's utility, but the code can be used in your programs as it will be part of the manual to help others understand how to program in SmartBASIC.

EDITED (Changes in BOLD): Changed "Reference Manual" to "Guide" as it will be part of the guide I am writing, and not in the reference manual written by the Dutchman.

George McGinn
George McGinn
Computer Scientist/Cosmologist/Writer/Photographer
Member: IEEE, IEEE Computer Society
IEEE Sensors Council & IoT Technical Community
American Association for the Advancement of Science (AAAS)

Post Reply