aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js')
-rw-r--r--src/bun.js/webcore/request.zig14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/bun.js/webcore/request.zig b/src/bun.js/webcore/request.zig
index 231f0deed..cff2ef2f3 100644
--- a/src/bun.js/webcore/request.zig
+++ b/src/bun.js/webcore/request.zig
@@ -255,19 +255,7 @@ pub const Request = struct {
this: *Request,
globalThis: *JSC.JSGlobalObject,
) callconv(.C) JSC.JSValue {
- const string_contents: string = switch (this.method) {
- .GET => "GET",
- .HEAD => "HEAD",
- .PATCH => "PATCH",
- .PUT => "PUT",
- .POST => "POST",
- .OPTIONS => "OPTIONS",
- .CONNECT => "CONNECT",
- .TRACE => "TRACE",
- .DELETE => "DELETE",
- };
-
- return ZigString.init(string_contents).toValueGC(globalThis);
+ return bun.String.static(@tagName(this.method)).toJSConst(globalThis);
}
pub fn getMode(