The host name is wrong or empty
CommonA typo, a missing environment variable that leaves part of the URL empty, or a scheme pasted twice.
Confirm
echo "$URL"
A misspelled, empty or doubled host part
Fix
- Fix the URL; in scripts, print it before the curl call while debugging.