May 19, 2023
2:12 p.m.
How would I test whether a string is a valid absolute URL? At first, I thought to attempt a conversion and catch the error, but then I realized that invalid URLs donât always cause an error e.g. missing scheme and host return relative URLs with the entire string placed in the segments.