aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/url.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/url.zig b/src/url.zig
index 8b35d3ded..1e8bcae32 100644
--- a/src/url.zig
+++ b/src/url.zig
@@ -69,6 +69,10 @@ pub const URL = struct {
return strings.eqlComptime(this.protocol, "https");
}
+ pub inline fn isHTTP(this: *const URL) bool {
+ return strings.eqlComptime(this.protocol, "http");
+ }
+
pub fn displayHostname(this: *const URL) string {
if (this.hostname.len > 0) {
return this.hostname;