From 4903b6320a5a465bd02323a9482ccd791b4a270f Mon Sep 17 00:00:00 2001 From: uwaa Date: Wed, 13 Nov 2024 01:39:23 +0000 Subject: [PATCH] Update HttpRequest.cs --- HTTP/HttpRequest.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/HTTP/HttpRequest.cs b/HTTP/HttpRequest.cs index 3d9f854..ed156e9 100644 --- a/HTTP/HttpRequest.cs +++ b/HTTP/HttpRequest.cs @@ -100,8 +100,7 @@ public sealed class HttpRequest throw new RequestParseException("Invalid initial header"); //Method - HttpMethod method; - if (!Enum.TryParse(parts[0], true, out method)) + if (!Enum.TryParse(parts[0], true, out HttpMethod method)) throw new RequestParseException("Unknown HTTP method"); Method = method;