Slimmed down version of pomdtr/extractValInfo that focuses on extracting the HTTP endpoint URL of the Val.
Example usage:
const apiUrl = extractHttpEndpoint(import.meta.url);