diff options
author | 2022-04-07 06:08:48 -0700 | |
---|---|---|
committer | 2022-04-07 06:08:48 -0700 | |
commit | b97e81b27faf3d8805a8670035298d910cd32a83 (patch) | |
tree | 361f2a70077a5bc4a328cbaa48ff38b63f821c6b /src | |
parent | e08cc968cb531e35aa93e45c3443bc8d16854b83 (diff) | |
download | bun-b97e81b27faf3d8805a8670035298d910cd32a83.tar.gz bun-b97e81b27faf3d8805a8670035298d910cd32a83.tar.zst bun-b97e81b27faf3d8805a8670035298d910cd32a83.zip |
More types
Diffstat (limited to 'src')
-rw-r--r-- | src/url.zig | 4 |
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; |