Check if url is http
检查 url 是否为 http
The URL to check. 要检查的URL
True if the URL is HTTP, false otherwise. 如果URL是HTTP则返回true,否则返回false
isHttp('http://example.com') // trueisHttp('https://example.com') // trueisHttp('//example.com') // trueisHttp('ftp://example.com') // falseisHttp('example.com') // falseisHttp('mailto:username@example.com') // false Copy
isHttp('http://example.com') // trueisHttp('https://example.com') // trueisHttp('//example.com') // trueisHttp('ftp://example.com') // falseisHttp('example.com') // falseisHttp('mailto:username@example.com') // false
Check if url is http
检查 url 是否为 http