329 lines
20 KiB
C++
329 lines
20 KiB
C++
#ifndef pihttpconstants_h
|
|
#define pihttpconstants_h
|
|
|
|
|
|
namespace PIHTTP {
|
|
|
|
enum class Method {
|
|
Unknown,
|
|
Get,
|
|
Head,
|
|
Post,
|
|
Put,
|
|
Delete,
|
|
Connect,
|
|
Options,
|
|
Trace,
|
|
Patch
|
|
};
|
|
|
|
enum class Code {
|
|
Unknown = -1,
|
|
Continue = 100,
|
|
SwitchingProtocols = 101,
|
|
Processing = 102,
|
|
EarlyHints = 103,
|
|
|
|
Ok = 200,
|
|
Created = 201,
|
|
Accepted = 202,
|
|
NonAuthoritativeInformation = 203,
|
|
NoContent = 204,
|
|
ResetContent = 205,
|
|
PartialContent = 206,
|
|
MultiStatus = 207,
|
|
AlreadyReported = 208,
|
|
IMUsed = 226,
|
|
|
|
MultipleChoices = 300,
|
|
MovedPermanently = 301,
|
|
Found = 302,
|
|
SeeOther = 303,
|
|
NotModified = 304,
|
|
UseProxy = 305,
|
|
SwitchProxy = 306,
|
|
TemporaryRedirect = 307,
|
|
PermanentRedirect = 308,
|
|
|
|
BadRequest = 400,
|
|
Unauthorized = 401,
|
|
PaymentRequired = 402,
|
|
Forbidden = 403,
|
|
NotFound = 404,
|
|
MethodNotAllowed = 405,
|
|
NotAcceptable = 406,
|
|
ProxyAuthenticationRequired = 407,
|
|
RequestTimeout = 408,
|
|
Conflict = 409,
|
|
Gone = 410,
|
|
LengthRequired = 411,
|
|
PreconditionFailed = 412,
|
|
ContentTooLarge = 413,
|
|
UriTooLong = 414,
|
|
UnsupportedMediaType = 415,
|
|
RangeNotSatisfiable = 416,
|
|
ExpectationFailed = 417,
|
|
MisdirectedRequest = 421,
|
|
UnprocessableContent = 422,
|
|
Locked = 423,
|
|
FailedDependency = 424,
|
|
TooEarly = 425,
|
|
UpgradeRequired = 426,
|
|
PreconditionRequired = 428,
|
|
TooManyRequests = 429,
|
|
RequestHeaderFieldsTooLarge = 431,
|
|
RetryWith = 449,
|
|
BlockedByWindowsParentalControls = 450,
|
|
UnavailableForLegalReasons = 451,
|
|
|
|
InternalServerError = 500,
|
|
NotImplemented = 501,
|
|
BadGateway = 502,
|
|
ServiceUnavailable = 503,
|
|
GatewayTimeout = 504,
|
|
HttpVersionNotSupported = 505,
|
|
VariantAlsoNegotiates = 506,
|
|
InsufficientStorage = 507,
|
|
LoopDetected = 508,
|
|
NotExtended = 510,
|
|
BandwidthLimitExceeded = 509,
|
|
NetworkAuthenticationRequired = 511,
|
|
};
|
|
|
|
namespace Header {
|
|
constexpr static char Accept[] = "Accept";
|
|
constexpr static char AcceptCharset[] = "Accept-Charset";
|
|
constexpr static char AcceptEncoding[] = "Accept-Encoding";
|
|
constexpr static char AcceptLanguage[] = "Accept-Language";
|
|
constexpr static char AcceptRanges[] = "Accept-Ranges";
|
|
constexpr static char Age[] = "Age";
|
|
constexpr static char Allow[] = "Allow";
|
|
constexpr static char AuthenticationInfo[] = "Authentication-Info";
|
|
constexpr static char Authorization[] = "Authorization";
|
|
constexpr static char CacheControl[] = "Cache-Control";
|
|
constexpr static char Close[] = "Close";
|
|
constexpr static char Connection[] = "Connection";
|
|
constexpr static char ContentEncoding[] = "Content-Encoding";
|
|
constexpr static char ContentLanguage[] = "Content-Language";
|
|
constexpr static char ContentLength[] = "Content-Length";
|
|
constexpr static char ContentLocation[] = "Content-Location";
|
|
constexpr static char ContentRange[] = "Content-Range";
|
|
constexpr static char ContentType[] = "Content-Type";
|
|
constexpr static char Date[] = "Date";
|
|
constexpr static char ETag[] = "ETag";
|
|
constexpr static char Expect[] = "Expect";
|
|
constexpr static char Expires[] = "Expires";
|
|
constexpr static char From[] = "From";
|
|
constexpr static char Host[] = "Host";
|
|
constexpr static char IfMatch[] = "If-Match";
|
|
constexpr static char IfModifiedSince[] = "If-Modified-Since";
|
|
constexpr static char IfNoneMatch[] = "If-None-Match";
|
|
constexpr static char IfRange[] = "If-Range";
|
|
constexpr static char IfUnmodifiedSince[] = "If-Unmodified-Since";
|
|
constexpr static char LastModified[] = "Last-Modified";
|
|
constexpr static char Location[] = "Location";
|
|
constexpr static char MaxForwards[] = "Max-Forwards";
|
|
constexpr static char MimeVersion[] = "MIME-Version";
|
|
constexpr static char Pragma[] = "Pragma";
|
|
constexpr static char ProxyAuthenticate[] = "Proxy-Authenticate";
|
|
constexpr static char ProxyAuthenticationInfo[] = "Proxy-Authentication-Info";
|
|
constexpr static char ProxyAuthorization[] = "Proxy-Authorization";
|
|
constexpr static char Range[] = "Range";
|
|
constexpr static char Referer[] = "Referer";
|
|
constexpr static char RetryAfter[] = "Retry-After";
|
|
constexpr static char Server[] = "Server";
|
|
constexpr static char TE[] = "TE";
|
|
constexpr static char Trailer[] = "Trailer";
|
|
constexpr static char TransferEncoding[] = "Transfer-Encoding";
|
|
constexpr static char Upgrade[] = "Upgrade";
|
|
constexpr static char UserAgent[] = "User-Agent";
|
|
constexpr static char Vary[] = "Vary";
|
|
constexpr static char Via[] = "Via";
|
|
constexpr static char WWWAuthenticate[] = "WWW-Authenticate";
|
|
constexpr static char Asterisk[] = "*";
|
|
constexpr static char AIM[] = "A-IM";
|
|
constexpr static char AcceptAdditions[] = "Accept-Additions";
|
|
constexpr static char AcceptCH[] = "Accept-CH";
|
|
constexpr static char AcceptDatetime[] = "Accept-Datetime";
|
|
constexpr static char AcceptFeatures[] = "Accept-Features";
|
|
constexpr static char AcceptPatch[] = "Accept-Patch";
|
|
constexpr static char AcceptPost[] = "Accept-Post";
|
|
constexpr static char AcceptSignature[] = "Accept-Signature";
|
|
constexpr static char AccessControlAllowCredentials[] = "Access-Control-Allow-Credentials";
|
|
constexpr static char AccessControlAllowHeaders[] = "Access-Control-Allow-Headers";
|
|
constexpr static char AccessControlAllowMethods[] = "Access-Control-Allow-Methods";
|
|
constexpr static char AccessControlAllowOrigin[] = "Access-Control-Allow-Origin";
|
|
constexpr static char AccessControlExposeHeaders[] = "Access-Control-Expose-Headers";
|
|
constexpr static char AccessControlMaxAge[] = "Access-Control-Max-Age";
|
|
constexpr static char AccessControlRequestHeaders[] = "Access-Control-Request-Headers";
|
|
constexpr static char AccessControlRequestMethod[] = "Access-Control-Request-Method";
|
|
constexpr static char ALPN[] = "ALPN";
|
|
constexpr static char AltSvc[] = "Alt-Svc";
|
|
constexpr static char AltUsed[] = "Alt-Used";
|
|
constexpr static char Alternates[] = "Alternates";
|
|
constexpr static char ApplyToRedirectRef[] = "Apply-To-Redirect-Ref";
|
|
constexpr static char AuthenticationControl[] = "Authentication-Control";
|
|
constexpr static char CacheStatus[] = "Cache-Status";
|
|
constexpr static char CalManagedID[] = "Cal-Managed-ID";
|
|
constexpr static char CalDAVTimezones[] = "CalDAV-Timezones";
|
|
constexpr static char CapsuleProtocol[] = "Capsule-Protocol";
|
|
constexpr static char CDNCacheControl[] = "CDN-Cache-Control";
|
|
constexpr static char CDNLoop[] = "CDN-Loop";
|
|
constexpr static char CertNotAfter[] = "Cert-Not-After";
|
|
constexpr static char CertNotBefore[] = "Cert-Not-Before";
|
|
constexpr static char ClearSiteData[] = "Clear-Site-Data";
|
|
constexpr static char ClientCert[] = "Client-Cert";
|
|
constexpr static char ClientCertChain[] = "Client-Cert-Chain";
|
|
constexpr static char ContentDigest[] = "Content-Digest";
|
|
constexpr static char ContentDisposition[] = "Content-Disposition";
|
|
constexpr static char ContentID[] = "Content-ID";
|
|
constexpr static char ContentSecurityPolicy[] = "Content-Security-Policy";
|
|
constexpr static char ContentSecurityPolicyReportOnly[] = "Content-Security-Policy-Report-Only";
|
|
constexpr static char Cookie[] = "Cookie";
|
|
constexpr static char CrossOriginEmbedderPolicy[] = "Cross-Origin-Embedder-Policy";
|
|
constexpr static char CrossOriginEmbedderPolicyReportOnly[] = "Cross-Origin-Embedder-Policy-Report-Only";
|
|
constexpr static char CrossOriginOpenerPolicy[] = "Cross-Origin-Opener-Policy";
|
|
constexpr static char CrossOriginOpenerPolicyReportOnly[] = "Cross-Origin-Opener-Policy-Report-Only";
|
|
constexpr static char CrossOriginResourcePolicy[] = "Cross-Origin-Resource-Policy";
|
|
constexpr static char DASL[] = "DASL";
|
|
constexpr static char DAV[] = "DAV";
|
|
constexpr static char DeltaBase[] = "Delta-Base";
|
|
constexpr static char Depth[] = "Depth";
|
|
constexpr static char Destination[] = "Destination";
|
|
constexpr static char DifferentialID[] = "Differential-ID";
|
|
constexpr static char DPoP[] = "DPoP";
|
|
constexpr static char DPoPNonce[] = "DPoP-Nonce";
|
|
constexpr static char EarlyData[] = "Early-Data";
|
|
constexpr static char ExpectCT[] = "Expect-CT";
|
|
constexpr static char Forwarded[] = "Forwarded";
|
|
constexpr static char Hobareg[] = "Hobareg";
|
|
constexpr static char If[] = "If";
|
|
constexpr static char IfScheduleTagMatch[] = "If-Schedule-Tag-Match";
|
|
constexpr static char IM[] = "IM";
|
|
constexpr static char IncludeReferredTokenBindingID[] = "Include-Referred-Token-Binding-ID";
|
|
constexpr static char KeepAlive[] = "Keep-Alive";
|
|
constexpr static char Label[] = "Label";
|
|
constexpr static char LastEventID[] = "Last-Event-ID";
|
|
constexpr static char Link[] = "Link";
|
|
constexpr static char LockToken[] = "Lock-Token";
|
|
constexpr static char MementoDatetime[] = "Memento-Datetime";
|
|
constexpr static char Meter[] = "Meter";
|
|
constexpr static char Negotiate[] = "Negotiate";
|
|
constexpr static char NEL[] = "NEL";
|
|
constexpr static char ODataEntityid[] = "OData-EntityId";
|
|
constexpr static char ODataIsolation[] = "OData-Isolation";
|
|
constexpr static char ODataMaxversion[] = "OData-MaxVersion";
|
|
constexpr static char ODataVersion[] = "OData-Version";
|
|
constexpr static char OptionalWWWAuthenticate[] = "Optional-WWW-Authenticate";
|
|
constexpr static char OrderingType[] = "Ordering-Type";
|
|
constexpr static char Origin[] = "Origin";
|
|
constexpr static char OriginAgentCluster[] = "Origin-Agent-Cluster";
|
|
constexpr static char OSCORE[] = "OSCORE";
|
|
constexpr static char OSLCCoreVersion[] = "OSLC-Core-Version";
|
|
constexpr static char Overwrite[] = "Overwrite";
|
|
constexpr static char PingFrom[] = "Ping-From";
|
|
constexpr static char PingTo[] = "Ping-To";
|
|
constexpr static char Position[] = "Position";
|
|
constexpr static char Prefer[] = "Prefer";
|
|
constexpr static char PreferenceApplied[] = "Preference-Applied";
|
|
constexpr static char Priority[] = "Priority";
|
|
constexpr static char ProxyStatus[] = "Proxy-Status";
|
|
constexpr static char PublicKeyPins[] = "Public-Key-Pins";
|
|
constexpr static char PublicKeyPinsReportOnly[] = "Public-Key-Pins-Report-Only";
|
|
constexpr static char RedirectRef[] = "Redirect-Ref";
|
|
constexpr static char Refresh[] = "Refresh";
|
|
constexpr static char ReplayNonce[] = "Replay-Nonce";
|
|
constexpr static char ReprDigest[] = "Repr-Digest";
|
|
constexpr static char ScheduleReply[] = "Schedule-Reply";
|
|
constexpr static char ScheduleTag[] = "Schedule-Tag";
|
|
constexpr static char SecPurpose[] = "Sec-Purpose";
|
|
constexpr static char SecTokenBinding[] = "Sec-Token-Binding";
|
|
constexpr static char SecWebsocketAccept[] = "Sec-WebSocket-Accept";
|
|
constexpr static char SecWebsocketExtensions[] = "Sec-WebSocket-Extensions";
|
|
constexpr static char SecWebsocketKey[] = "Sec-WebSocket-Key";
|
|
constexpr static char SecWebsocketProtocol[] = "Sec-WebSocket-Protocol";
|
|
constexpr static char SecWebsocketVersion[] = "Sec-WebSocket-Version";
|
|
constexpr static char ServerTiming[] = "Server-Timing";
|
|
constexpr static char SetCookie[] = "Set-Cookie";
|
|
constexpr static char Signature[] = "Signature";
|
|
constexpr static char SignatureInput[] = "Signature-Input";
|
|
constexpr static char SLUG[] = "SLUG";
|
|
constexpr static char Soapaction[] = "SoapAction";
|
|
constexpr static char StatusURI[] = "Status-URI";
|
|
constexpr static char StrictTransportSecurity[] = "Strict-Transport-Security";
|
|
constexpr static char Sunset[] = "Sunset";
|
|
constexpr static char SurrogateCapability[] = "Surrogate-Capability";
|
|
constexpr static char SurrogateControl[] = "Surrogate-Control";
|
|
constexpr static char TCN[] = "TCN";
|
|
constexpr static char Timeout[] = "Timeout";
|
|
constexpr static char Topic[] = "Topic";
|
|
constexpr static char Traceparent[] = "Traceparent";
|
|
constexpr static char Tracestate[] = "Tracestate";
|
|
constexpr static char TTL[] = "TTL";
|
|
constexpr static char Urgency[] = "Urgency";
|
|
constexpr static char VariantVary[] = "Variant-Vary";
|
|
constexpr static char WantContentDigest[] = "Want-Content-Digest";
|
|
constexpr static char WantReprDigest[] = "Want-Repr-Digest";
|
|
constexpr static char XContentTypeOptions[] = "X-Content-Type-Options";
|
|
constexpr static char XFrameOptions[] = "X-Frame-Options";
|
|
constexpr static char AmpCacheTransform[] = "AMP-Cache-Transform";
|
|
constexpr static char ConfigurationContext[] = "Configuration-Context";
|
|
constexpr static char EDIINTFeatures[] = "EDIINT-Features";
|
|
constexpr static char Isolation[] = "Isolation";
|
|
constexpr static char PermissionsPolicy[] = "Permissions-Policy";
|
|
constexpr static char RepeatabilityClientID[] = "Repeatability-Client-ID";
|
|
constexpr static char RepeatabilityFirstSent[] = "Repeatability-First-Sent";
|
|
constexpr static char RepeatabilityRequestID[] = "Repeatability-Request-ID";
|
|
constexpr static char RepeatabilityResult[] = "Repeatability-Result";
|
|
constexpr static char ReportingEndpoints[] = "Reporting-Endpoints";
|
|
constexpr static char SecGPC[] = "Sec-GPC";
|
|
constexpr static char TimingAllowOrigin[] = "Timing-Allow-Origin";
|
|
constexpr static char CPEPInfo[] = "C-PEP-Info";
|
|
constexpr static char ProtocolInfo[] = "Protocol-Info";
|
|
constexpr static char ProtocolQuery[] = "Protocol-Query";
|
|
constexpr static char AccessControl[] = "Access-Control";
|
|
constexpr static char CExt[] = "C-Ext";
|
|
constexpr static char CMan[] = "C-Man";
|
|
constexpr static char COpt[] = "C-Opt";
|
|
constexpr static char CPEP[] = "C-PEP";
|
|
constexpr static char ContentBase[] = "Content-Base";
|
|
constexpr static char ContentMD5[] = "Content-MD5";
|
|
constexpr static char ContentScriptType[] = "Content-Script-Type";
|
|
constexpr static char ContentStyleType[] = "Content-Style-Type";
|
|
constexpr static char ContentVersion[] = "Content-Version";
|
|
constexpr static char Cookie2[] = "Cookie2";
|
|
constexpr static char DefaultStyle[] = "Default-Style";
|
|
constexpr static char DerivedFrom[] = "Derived-From";
|
|
constexpr static char Digest[] = "Digest";
|
|
constexpr static char Ext[] = "Ext";
|
|
constexpr static char Getprofile[] = "GetProfile";
|
|
constexpr static char HTTP2Settings[] = "HTTP2-Settings";
|
|
constexpr static char Man[] = "Man";
|
|
constexpr static char MethodCheck[] = "Method-Check";
|
|
constexpr static char MethodCheckExpires[] = "Method-Check-Expires";
|
|
constexpr static char Opt[] = "Opt";
|
|
constexpr static char P3P[] = "P3P";
|
|
constexpr static char PEP[] = "PEP";
|
|
constexpr static char PepInfo[] = "Pep-Info";
|
|
constexpr static char PICSLabel[] = "PICS-Label";
|
|
constexpr static char Profileobject[] = "ProfileObject";
|
|
constexpr static char Protocol[] = "Protocol";
|
|
constexpr static char ProtocolRequest[] = "Protocol-Request";
|
|
constexpr static char ProxyFeatures[] = "Proxy-Features";
|
|
constexpr static char ProxyInstruction[] = "Proxy-Instruction";
|
|
constexpr static char Public[] = "Public";
|
|
constexpr static char RefererRoot[] = "Referer-Root";
|
|
constexpr static char Safe[] = "Safe";
|
|
constexpr static char SecurityScheme[] = "Security-Scheme";
|
|
constexpr static char SetCookie2[] = "Set-Cookie2";
|
|
constexpr static char Setprofile[] = "SetProfile";
|
|
constexpr static char URI[] = "URI";
|
|
constexpr static char WantDigest[] = "Want-Digest";
|
|
constexpr static char Warning[] = "Warning";
|
|
}; // namespace Header
|
|
|
|
}; // namespace PIHTTP
|
|
|
|
|
|
#endif
|