SimpleREST.NET 0.1
A simple and minimal api framework for .net base on Express.js
Loading...
Searching...
No Matches
RedirectCode.cs
Go to the documentation of this file.
1using System;
2using Spectre.Console;
3
4namespace SimpleRest.Api;
5
6public class RedirectCode : StatusCode
7{
8 public RedirectCode(int code, string name = "", string message = "", string severity = "")
9 : base(code, name, message, severity)
10 {
11 ;
12 }
13
15 new RedirectCode(
16 301,
17 "Moved Permanently",
18 "The resource has been moved permanently.",
19 "info"
20 );
21 public static RedirectCode Found =>
22 new RedirectCode(
23 302,
24 "Found",
25 "The resource has been found at a different location.",
26 "info"
27 );
28 public static RedirectCode SeeOther =>
29 new RedirectCode(303, "See Other", "The response can be found at another URI.", "info");
30 public static RedirectCode NotModified =>
31 new RedirectCode(
32 304,
33 "Not Modified",
34 "The resource has not been modified since the last request.",
35 "info"
36 );
37 public static RedirectCode UseProxy =>
38 new RedirectCode(
39 305,
40 "Use Proxy",
41 "The requested resource must be accessed through the proxy.",
42 "warning"
43 );
45 new RedirectCode(
46 307,
47 "Temporary Redirect",
48 "The resource is temporarily located at a different URI.",
49 "info"
50 );
52 new RedirectCode(
53 308,
54 "Permanent Redirect",
55 "The resource is permanently located at a different URI.",
56 "info"
57 );
58}
static RedirectCode PermanentRedirect
static RedirectCode SeeOther
static RedirectCode UseProxy
static RedirectCode NotModified
RedirectCode(int code, string name="", string message="", string severity="")
static RedirectCode Found
static RedirectCode MovedPermanently
static RedirectCode TemporaryRedirect