From 1f3a62a7a871482cae9f4c5c2045ab3d822727aa Mon Sep 17 00:00:00 2001 From: uwaa Date: Mon, 9 Dec 2024 22:30:37 +0000 Subject: [PATCH] http: add Forbidden --- HTTP/HttpResponse.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HTTP/HttpResponse.cs b/HTTP/HttpResponse.cs index 5529e53..360c9da 100644 --- a/HTTP/HttpResponse.cs +++ b/HTTP/HttpResponse.cs @@ -31,6 +31,8 @@ public class HttpResponse public static HttpResponse BadRequest(HttpContent? content = null) => new HttpResponse(400, "Bad request", content); + public static HttpResponse Forbidden(HttpContent? content = null) => new HttpResponse(403, "Forbidden", content); + public static HttpResponse NotFound(HttpContent? content = null) => new HttpResponse(404, "Not found", content); public static HttpResponse NotAcceptable(HttpContent? content = null) => new HttpResponse(406, "Not acceptable", content);