I selected my own post as the solution because it answers the original question. But the credit should go to @fpy for asking the critical question.
For the larger question of how to make Http HEAD requests, a python library could be embedded in the document, which would be superior to using external files. But the code in the LO documentation that explains how to access python scripts in Basic doesn’t work & it’s not obvious how to fix it. Code I’ve seen elsewhere also doesn’t work. Alternately, someone at the OO forum has posted Basic routines that use UNO to make Http requests, w/ no external code libraries. But it also doesn’t work, at least not on my computer. & finally there’s the OAuth2OOo extension. I haven’t tried it yet. Assuming it works, it requires an external file, which is still superior to my original solution requiring 2 external files. Also, it gives me more control over the Http requests.
While I was typing this, I discovered that I can run curl in cmd. But we’ve established that Shell doesn’t like clip, so yet another solution w/ problems.