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

namespace HttpRequest
{
	enum class Type
	{
		UNKNOWN = -1,
		GET,
		HEAD,
		POST,
		PUT,
		DELETE,
		TRACE,
		OPTIONS,
		CONNECT,
		PATCH
	};

	const std::vector<std::string> typeStrings = {
		"GET",
		"HEAD",
		"POST",
		"PUT",
		"DELETE",
		"TRACE",
		"OPTIONS",
		"CONNECT",
		"PATCH",
	};

	enum class Header
	{
		UNKNOWN = -1,
		// https://en.wikipedia.org/wiki/List_of_HTTP_header_fields
		ACCEPT,
		ACCEPT_CHARSET,
		ACCEPT_ENCODING,
		ACCEPT_LANGUAGE,
		ACCEPT_DATETIME,
		ACCESS_CONTROL_REQUEST_METHOD,
		ACCESS_CONTROL_REQUEST_HEADERS,
		AUTHORIZATION,
		CACHE_CONTROL,
		CONNECTION,
		COOKIE,
		CONTENT_LENGTH,
		CONTENT_MD5, // obsolete
		CONTENT_TYPE,
		DATE,
		EXPECT,
		FORWARDED,
		FROM,
		HOST,
		IF_MATCH,
		IF_MODIFIED_SINCE,
		IF_NONE_MATCH,
		IF_RANGE,
		IF_UNMODIFIED_SINCE,
		MAX_FORWARDS,
		ORIGIN,
		PRAGMA,
		PROXY_AUTHORIZATION,
		RANGE,
		REFERER,
		TE, // transfer encoding
		USER_AGENT,
		UPGRADE,
		VIA,
		WARNING
	};

	const std::vector<std::string> headerStrings = {
		"Accept",
		"Accept-Charset",
		"Accept-Encoding",
		"Accept-Language",
		"Accept-Datetime",
		"Access-Control-Request-Method",
		"Access-Control-Request-Headers",
		"Authorization",
		"Cache-Control",
		"Connection",
		"Cookie",
		"Content-Length",
		"Content-MD5",
		"Content-Type",
		"Date",
		"Expect",
		"Forwarded",
		"From",
		"Host",
		"If-Match",
		"If-Modified-Since",
		"If-None-Match",
		"If-Range",
		"If-Unmodified-Since",
		"Max-Forwards",
		"Origin",
		"Pragma",
		"Proxy-Authorization",
		"Range",
		"Referer",
		"TE",
		"User-Agent",
		"Upgrade",
		"Via",
		"Warning",
	};
}