I've recently (2022-03) done the same but also .space and all others from https://en.wikipedia.org/wiki/List_of_Internet_top-level_dom... and discovered:
curl http://ai
Apache's Hello world:
curl http://pn
ping tk
ping uz
ping cm
All others had this error:
curl: (6) Could not resolve host: %tld%
You need the trailing dot for it to reliably work: http://ai./
http://ai/
A few years ago I tried all two-letter ([a-z]) TLDs and found some others that were able to handle HTTP requests, but they were either just redirecting to another domain name (the ones I noted down back then don't seem to work anymore) or returning 500 errors (http://uz/).
These examples should at least demonstrate that there shouldn't technically be some special case for resolving TLDs. They work in normal web browsers, and presumably a lack of A records for other TLDs would just be some sort of convention.