#pragma once
#include <string>
#include <vector>

namespace HttpResponse
{
	const std::vector<int> codeValues
	{
		100,
		101,
		102,
		200,
		201,
		202,
		203,
		204,
		205,
		206,
		207,
		208,
		226,
		300,
		301,
		302,
		303,
		304,
		305,
		306,
		307,
		308,
		400,
		401,
		402,
		403,
		404,
		405,
		406,
		407,
		408,
		409,
		410,
		411,
		412,
		413,
		414,
		415,
		416,
		417,
		418,
		421,
		422,
		423,
		424,
		426,
		428,
		429,
		431,
		451,
		500,
		501,
		502,
		503,
		504,
		505,
		506,
		507,
		508,
		510,
		511,
	};

	enum class Code : int
	{
		UNKNOWN = -1,
		CONTINUE,
		SWITCHING_PROTOCOLS,
		PROCESSING,
		OK,
		CREATED,
		ACCEPTED,
		NON_AUTHORITATIVE_INFORMATION,
		NO_CONTENT,
		RESET_CONTENT,
		PARTIAL_CONTENT,
		MULTI_STATUS,
		ALREADY_REPORTED,
		IM_USED,
		MULTIPLE_CHOICES,
		MOVED_PERMANENTLY,
		FOUND,
		SEE_OTHER,
		NOT_MODIFIED,
		USE_PROXY,
		UNUSED,
		TEMPORARY_REDIRECT,
		PERMANENT_REDIRECT,
		BAD_REQUEST,
		UNAUTHORIZED,
		PAYMENT_REQUIRED,
		FORBIDDEN,
		NOT_FOUND,
		METHOD_NOT_ALLOWED,
		NOT_ACCEPTABLE,
		PROXY_AUTHENTICATION_REQUIRED,
		REQUEST_TIMEOUT,
		CONFLICT,
		GONE,
		LENGTH_REQUIRED,
		PRECONDITION_FAILED,
		PAYLOAD_TOO_LARGE,
		URI_TOO_LONG,
		UNSUPPORTED_MEDIA_TYPE,
		RANGE_NOT_SATISFIABLE,
		EXPECTATION_FAILED,
		I_AM_A_TEAPOT,
		MISDIRECTED_REQUEST,
		UNPROCESSABLE_ENTITY,
		LOCKED,
		FAILED_DEPENDENCY,
		UPGRADE_REQUIRED,
		PRECONDITION_REQUIRED,
		TOO_MANY_REQUESTS,
		REQUEST_HEADER_FIELDS_TOO_LARGE,
		UNAVAILABLE_FOR_LEGAL_REASONS,
		INTERNAL_SERVER_ERROR,
		NOT_IMPLEMENTED,
		BAD_GATEWAY,
		SERVICE_UNAVAILABLE,
		GATEWAY_TIMEOUT,
		HTTP_VERSION_NOT_SUPPORTED,
		VARIANT_ALSO_NEGOTIATES,
		INSUFFICIENT_STORAGE,
		LOOP_DETECTED,
		NOT_EXTENDED,
		NETWORK_AUTHENTICATION_REQUIRED
	};

	const std::vector<std::string> codeStrings = {
		"Continue",
		"Switching Protocols",
		"Processing",
		"OK",
		"Created",
		"Accepted",
		"Non-Authoritative Information",
		"No Content",
		"Reset Content",
		"Partial Content",
		"Multi-Status",
		"Already Reported",
		"IM Used",
		"Multiple Choices",
		"Moved Permanently",
		"Found",
		"See Other",
		"Not Modified",
		"Use Proxy",
		"(Unused)",
		"Temporary Redirect",
		"Permanent Redirect",
		"Bad Request",
		"Unauthorized",
		"Payment Required",
		"Forbidden",
		"Not Found",
		"Method Not Allowed",
		"Not Acceptable",
		"Proxy Authentication Required",
		"Request Timeout",
		"Conflict",
		"Gone",
		"Length Required",
		"Precondition Failed",
		"Payload Too Large",
		"URI Too Long",
		"Unsupported Media Type",
		"Range Not Satisfiable",
		"Expectation Failed",
		"I am a teapot",
		"Misdirected Request",
		"Unprocessable Entity",
		"Locked",
		"Failed Dependency",
		"Upgrade Required",
		"Precondition Required",
		"Too Many Requests",
		"Request Header Fields Too Large",
		"Unavailable For Legal Reasons",
		"Internal Server Error",
		"Not Implemented",
		"Bad Gateway",
		"Service Unavailable",
		"Gateway Timeout",
		"HTTP Version Not Supported",
		"Variant Also Negotiates",
		"Insufficient Storage",
		"Loop Detected",
		"Not Extended",
		"Network Authentication Required",
	};

	enum class Header
	{
		UNKNOWN = -1,
		// https://en.wikipedia.org/wiki/List_of_HTTP_header_fields
		ACCESS_CONTROL_ALLOW_ORIGIN,
		ACCESS_CONTROL_ALLOW_CREDENTIALS,
		ACCESS_CONTROL_EXPOSE_HEADERS,
		ACCESS_CONTROL_MAX_AGE,
		ACCESS_CONTROL_ALLOW_METHODS,
		ACCESS_CONTROL_ALLOW_HEADERS,
		ACCEPT_PATCH,
		ACCEPT_RANGES,
		AGE,
		ALLOW,
		ALT_SVC,
		CACHE_CONTROL,
		CONNECTION,
		CONTENT_DISPOSITION,
		CONTENT_ENCODING,
		CONTENT_LANGUAGE,
		CONTENT_LENGTH,
		CONTENT_LOCATION,
		CONTENT_MD5,
		CONTENT_RANGE,
		CONTENT_TYPE,
		DATE,
		ETAG,
		EXPIRES,
		LAST_MODIFIED,
		LINK,
		LOCATION,
		P3P,
		PRAGMA,
		PROXY_AUTHENTICATE,
		PUBLIC_KEY_PINS,
		RETRY_AFTER,
		SERVER,
		SET_COOKIE,
		STRICT_TRANSPORT_SECURITY,
		TRAILER,
		TRANSFER_ENCODING,
		TK,
		UPGRADE,
		VARY,
		VIA,
		WARNING,
		WWW_AUTHENTICATE,
		X_FRAME_OPTION
	};

	const std::vector<std::string> headerStrings = {
		"Access-Control-Allow-Origin",
		"Access-Control-Allow-Credentials",
		"Access-Control-Expose-Headers",
		"Access-Control-Max-Age",
		"Access-Control-Allow-Methods",
		"Access-Control-Allow-Headers",
		"Accept-Patch",
		"Accept-Ranges",
		"Age",
		"Allow",
		"Alt-Svc",
		"Cache-Control",
		"Connection",
		"Content-Disposition",
		"Content-Encoding",
		"Content-Language",
		"Content-Length",
		"Content-Location",
		"Content-MD5",
		"Content-Range",
		"Content-Type",
		"Date",
		"ETag",
		"Expires",
		"Last-Modified",
		"Link",
		"Location",
		"P3P",
		"Pragma",
		"Proxy-Authenticate",
		"Public-Key-Pins",
		"Retry-After",
		"Server",
		"Set-Cookie",
		"Strict-Transport-Security",
		"Trailer",
		"Transfer-Encoding",
		"Tk",
		"Upgrade",
		"Vary",
		"Via",
		"Warning",
		"WWW-Authenticate",
		"X-Frame-Option",
	};
}