import { Mimes } from './Mimes'; export const HttpHeaders = { ContentLength : 'Content-Length', ContentType : 'Content-Type', ContentEncoding : 'Content-Encoding', Accept : 'Accept', Authorization : 'Authorization', CacheControl : 'Cache-Control', Connection : 'Connection', Date : 'Date', Host : 'Host', Pragma : 'Pragma', Trailer : 'Trailer', TransferEncoding : 'Transfer-Encoding', Upgrade : 'Upgrade', Via : 'Via', Warning : 'Warning', AcceptCharset : 'Accept-Charset', AcceptEncoding : 'Accept-Encoding', AcceptLanguage : 'Accept-Language', AccessControlAllowOrigin : 'Access-Control-Allow-Origin', AccessControlAllowMethods : 'Access-Control-Allow-Methods', AccessControlAllowHeaders : 'Access-Control-Allow-Headers', AccessControlExposeHeaders : 'Access-Control-Expose-Headers', Expect : 'Expect', From : 'From', MaxForwards : 'Max-Forwards', Referer : 'Referer', UserAgent : 'User-Agent', Cookie : 'Cookie', SetCookie : 'Set-Cookie', // SetHeader : 'Set-Header', Cookie2 : 'Cookie2', SetCookie2 : 'Set-Cookie2', Location : 'Location', IfModifiedSince : 'If-Modified-Since', IfUnmodifiedSince : 'If-Unmodified-Since', IfMatch : 'If-Match', IfNoneMatch : 'If-None-Match', IfRange : 'If-Range', Allow : 'Allow', Server : 'Server', XSimpleBootSsrIntentScheme: 'x-simple-boot-ssr-intent-scheme', XSimpleBootHttpTopicProtocol: 'x-simple-boot-http-topic-protocol' } export type HttpHeadersType = keyof typeof HttpHeaders; export const makeIntentHeaderBySymbolFor = (symbol: Symbol): HeadersInit => { return { [HttpHeaders.Accept]: Mimes.ApplicationJsonPostSimpleBootSsrIntentScheme, [HttpHeaders.XSimpleBootSsrIntentScheme]: `Symbol.for(${symbol.description})` } };