-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTTP.cs
More file actions
91 lines (87 loc) · 4.02 KB
/
HTTP.cs
File metadata and controls
91 lines (87 loc) · 4.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
namespace Webtech3;
/// <summary>
/// Static class for HTTP Entities (Methods & Statuses)
/// </summary>
public static class HTTP {
public enum Methods : byte {
OPTIONS, GET, HEAD,
POST, PUT, PATCH,
DELETE, TRACE, CONNECT
}
public static class Statuses {
public static class Informational {
public const int Continue = 100;
public const int Switching_Protocols = 101;
public const int Processing = 102;
public const int Early_Hints = 103;
} // Informational
public static class Success {
public const int OK = 200;
public const int Created = 201;
public const int Accepted = 202;
public const int Non_Authoritative_Information = 203;
public const int No_Content = 204;
public const int Reset_Content = 205;
public const int Partial_Content = 206;
public const int Multi_Status = 207;
public const int Already_Reported = 208;
public const int IM_Used = 226;
} // Success
public static class Redirection {
public const int Multiple_Choices = 300;
public const int Moved_Permanently = 301;
public const int Found = 302;
public const int See_Other = 303;
public const int Not_Modified = 304;
public const int Use_Proxy = 305;
public const int Temporary_Redirect = 307;
public const int Permanent_Redirect = 308;
} // Redirection
public static class Errors {
public static class Client {
public const int Bad_Request = 400;
public const int Unauthorized = 401;
public const int Payment_Required = 402;
public const int Forbidden = 403;
public const int Not_Found = 404;
public const int Method_Not_Allowed = 405;
public const int Not_Acceptable = 406;
public const int Proxy_Authentication_Required = 407;
public const int Request_Timeout = 408;
public const int Conflict = 409;
public const int Gone = 410;
public const int Length_Required = 411;
public const int Precondition_Failed = 412;
public const int Payload_Too_Large = 413;
public const int URI_Too_Long = 414;
public const int Unsupported_Media_Type = 415;
public const int Range_Not_Satisfiable = 416;
public const int Expectation_Failed = 417;
public const int Im_A_Teapot = 418;
public const int Misdirected_Request = 421;
public const int Unprocessable_Entity = 422;
public const int Locked = 423;
public const int Failed_Dependency = 424;
public const int Too_Early = 425;
public const int Upgrade_Required = 426;
public const int Precondition_Required = 428;
public const int Too_Many_Requests = 429;
public const int Request_Header_Fields_Too_Large = 431;
public const int Unavailable_For_Legal_Reasons = 451;
} // Client
public static class Server {
public const int Internal_Server_Error = 500;
public const int Not_Implemented = 501;
public const int Bad_Gateway = 502;
public const int Service_Unavailable = 503;
public const int Gateway_Timeout = 504;
public const int HTTP_Version_Not_Supported = 505;
public const int Variant_Also_Negotiates = 506;
public const int Insufficient_Storage = 507;
public const int Loop_Detected = 508;
public const int Not_Extended = 510;
public const int Network_Authentication_Required = 511;
} // Server
} //Errors
} // Statuses
}