From f61957e19c1a90123a136a6f847982ddaf5835a5 Mon Sep 17 00:00:00 2001 From: uwaa Date: Wed, 11 Dec 2024 01:46:55 +0000 Subject: [PATCH] http: Add MethodNotAllowed --- HTTP/HttpResponse.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HTTP/HttpResponse.cs b/HTTP/HttpResponse.cs index 360c9da..17d6a14 100644 --- a/HTTP/HttpResponse.cs +++ b/HTTP/HttpResponse.cs @@ -35,6 +35,8 @@ public class HttpResponse public static HttpResponse NotFound(HttpContent? content = null) => new HttpResponse(404, "Not found", content); + public static HttpResponse MethodNotAllowed(HttpContent? content = null) => new HttpResponse(405, "Method not allowed", content); + public static HttpResponse NotAcceptable(HttpContent? content = null) => new HttpResponse(406, "Not acceptable", content); public static HttpResponse InternalServerError(HttpContent? content = null) => new HttpResponse(500, "Internal server error", content);