27 lines
690 B
C#
27 lines
690 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.Remoting.Messaging;
|
|
namespace ln.http
|
|
{
|
|
public class HttpStatusCodes
|
|
{
|
|
static Dictionary<int, string> statusMessages = new Dictionary<int, string>()
|
|
{
|
|
{ 200, "Ok" },
|
|
{ 201, "Created" },
|
|
{ 202, "Accepted" },
|
|
{ 204, "No Content" },
|
|
{ 403, "Access denied" },
|
|
{ 404, "Not Found" },
|
|
{ 500, "Internal Error" }
|
|
};
|
|
|
|
public static String GetStatusMessage(int code){
|
|
if (statusMessages.ContainsKey(code))
|
|
return statusMessages[code];
|
|
return "";
|
|
}
|
|
|
|
}
|
|
}
|