@jayfong/x-server 2.119.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/lib/_virtual/_rolldown/runtime.mjs +4 -0
  2. package/lib/cli/api_generator.d.mts +74 -0
  3. package/lib/cli/api_generator.mjs +310 -0
  4. package/lib/cli/build_util.d.mts +17 -0
  5. package/lib/cli/build_util.mjs +156 -0
  6. package/lib/cli/cli.d.mts +1 -0
  7. package/lib/cli/cli.mjs +355 -0
  8. package/lib/cli/css_register.d.mts +1 -0
  9. package/lib/cli/css_register.mjs +7 -0
  10. package/lib/cli/deploy_util.d.mts +23 -0
  11. package/lib/cli/deploy_util.mjs +70 -0
  12. package/lib/cli/dev_util.d.mts +7 -0
  13. package/lib/cli/dev_util.mjs +25 -0
  14. package/lib/cli/env_util.d.mts +45 -0
  15. package/lib/cli/env_util.mjs +207 -0
  16. package/lib/cli/esbuild_register.d.mts +1 -0
  17. package/lib/cli/esbuild_register.mjs +7 -0
  18. package/lib/cli/template_util.d.mts +18 -0
  19. package/lib/cli/template_util.mjs +85 -0
  20. package/lib/cli/templates/crons.ts +1 -1
  21. package/lib/cli/templates/handlers.ts +1 -1
  22. package/lib/cli/templates/hooks.ts +1 -1
  23. package/lib/cli/templates/models.ts +7 -7
  24. package/lib/cli/templates/package.json +11 -1
  25. package/lib/cli/templates/routes.ts +2 -1
  26. package/lib/core/ctx_storage.d.mts +3 -0
  27. package/lib/core/ctx_storage.mjs +4 -0
  28. package/lib/core/define_bus.d.mts +37 -0
  29. package/lib/core/define_bus.mjs +12 -0
  30. package/lib/core/{define_cron.d.ts → define_cron.d.mts} +2 -2
  31. package/lib/core/define_cron.mjs +11 -0
  32. package/lib/core/{define_handler.d.ts → define_handler.d.mts} +19 -19
  33. package/lib/core/define_handler.mjs +44 -0
  34. package/lib/core/define_hook.d.mts +2 -0
  35. package/lib/core/define_hook.mjs +6 -0
  36. package/lib/core/define_server.d.mts +3 -0
  37. package/lib/core/define_server.mjs +8 -0
  38. package/lib/core/{define_task.d.ts → define_task.d.mts} +2 -2
  39. package/lib/core/define_task.mjs +102 -0
  40. package/lib/core/get_handler_url.d.mts +2 -0
  41. package/lib/core/get_handler_url.mjs +7 -0
  42. package/lib/core/handler.d.mts +16 -0
  43. package/lib/core/handler.mjs +132 -0
  44. package/lib/core/http_error.d.mts +2 -0
  45. package/lib/core/http_error.mjs +1 -0
  46. package/lib/core/http_header.d.mts +856 -0
  47. package/lib/core/http_header.mjs +860 -0
  48. package/lib/core/http_method.d.mts +3 -0
  49. package/lib/core/http_method.mjs +10 -0
  50. package/lib/core/http_redirect.d.mts +5 -0
  51. package/lib/core/http_redirect.mjs +10 -0
  52. package/lib/core/server.d.mts +20 -0
  53. package/lib/core/server.mjs +186 -0
  54. package/lib/core/types.d.mts +256 -0
  55. package/lib/exports.d.mts +46 -0
  56. package/lib/exports.mjs +46 -0
  57. package/lib/index.d.mts +48 -0
  58. package/lib/index.mjs +45 -0
  59. package/lib/plugins/base.d.mts +4 -0
  60. package/lib/plugins/compress.d.mts +12 -0
  61. package/lib/plugins/compress.mjs +15 -0
  62. package/lib/plugins/cookie.d.mts +12 -0
  63. package/lib/plugins/cookie.mjs +15 -0
  64. package/lib/plugins/cors.d.mts +22 -0
  65. package/lib/plugins/cors.mjs +34 -0
  66. package/lib/plugins/file_parser.d.mts +15 -0
  67. package/lib/plugins/file_parser.mjs +24 -0
  68. package/lib/plugins/form_body_parser.d.mts +12 -0
  69. package/lib/plugins/form_body_parser.mjs +15 -0
  70. package/lib/plugins/ws_parser.d.mts +12 -0
  71. package/lib/plugins/ws_parser.mjs +15 -0
  72. package/lib/plugins/xml_parser.d.mts +19 -0
  73. package/lib/plugins/xml_parser.mjs +40 -0
  74. package/lib/services/ai.d.mts +31 -0
  75. package/lib/services/ai.mjs +44 -0
  76. package/lib/services/base.d.mts +4 -0
  77. package/lib/services/base.mjs +1 -0
  78. package/lib/services/cache.d.mts +165 -0
  79. package/lib/services/cache.mjs +323 -0
  80. package/lib/services/captcha.d.mts +65 -0
  81. package/lib/services/captcha.mjs +61 -0
  82. package/lib/services/{crypto.js → crypto.d.mts} +19 -78
  83. package/lib/services/crypto.mjs +141 -0
  84. package/lib/services/db_value.d.mts +60 -0
  85. package/lib/services/db_value.mjs +64 -0
  86. package/lib/services/dingtalk.d.mts +39 -0
  87. package/lib/services/dingtalk.mjs +44 -0
  88. package/lib/services/dispose.d.mts +17 -0
  89. package/lib/services/dispose.mjs +18 -0
  90. package/lib/services/emoji.d.mts +10 -0
  91. package/lib/services/emoji.mjs +2025 -0
  92. package/lib/services/file_store.d.mts +49 -0
  93. package/lib/services/file_store.mjs +58 -0
  94. package/lib/services/html.d.mts +11 -0
  95. package/lib/services/html.mjs +12 -0
  96. package/lib/services/jwt.d.mts +33 -0
  97. package/lib/services/jwt.mjs +42 -0
  98. package/lib/services/log.d.mts +37 -0
  99. package/lib/services/log.mjs +99 -0
  100. package/lib/services/mail.d.mts +22 -0
  101. package/lib/services/mail.mjs +28 -0
  102. package/lib/services/pay.d.mts +123 -0
  103. package/lib/services/pay.mjs +157 -0
  104. package/lib/services/random.d.mts +27 -0
  105. package/lib/services/random.mjs +42 -0
  106. package/lib/services/rate_limit.d.mts +37 -0
  107. package/lib/services/rate_limit.mjs +40 -0
  108. package/lib/services/redis.d.mts +11 -0
  109. package/lib/services/redis.mjs +6 -0
  110. package/lib/services/sensitive_words.d.mts +29 -0
  111. package/lib/services/sensitive_words.mjs +37 -0
  112. package/lib/services/sms.d.mts +40 -0
  113. package/lib/services/sms.mjs +30238 -0
  114. package/lib/types/dto.d.mts +30 -0
  115. package/lib/types/dto.mjs +1 -0
  116. package/lib/x.d.mts +11 -0
  117. package/lib/x.mjs +21 -0
  118. package/lib/x_init.d.mts +1 -0
  119. package/lib/x_init.mjs +10 -0
  120. package/package.json +71 -16
  121. package/lib/_cjs/cli/api_generator.js +0 -458
  122. package/lib/_cjs/cli/build_util.js +0 -243
  123. package/lib/_cjs/cli/cli.js +0 -378
  124. package/lib/_cjs/cli/css_register.js +0 -7
  125. package/lib/_cjs/cli/deploy_util.js +0 -76
  126. package/lib/_cjs/cli/dev_util.js +0 -26
  127. package/lib/_cjs/cli/env_util.js +0 -252
  128. package/lib/_cjs/cli/esbuild_register.js +0 -7
  129. package/lib/_cjs/cli/template_util.js +0 -101
  130. package/lib/_cjs/cli/templates/crons.ts +0 -2
  131. package/lib/_cjs/cli/templates/handlers.ts +0 -3
  132. package/lib/_cjs/cli/templates/hooks.ts +0 -2
  133. package/lib/_cjs/cli/templates/models.ts +0 -123
  134. package/lib/_cjs/cli/templates/package.json +0 -3
  135. package/lib/_cjs/cli/templates/routes.ts +0 -68
  136. package/lib/_cjs/core/ctx_storage.js +0 -6
  137. package/lib/_cjs/core/define_bus.js +0 -31
  138. package/lib/_cjs/core/define_cron.js +0 -13
  139. package/lib/_cjs/core/define_handler.js +0 -56
  140. package/lib/_cjs/core/define_hook.js +0 -8
  141. package/lib/_cjs/core/define_server.js +0 -10
  142. package/lib/_cjs/core/define_task.js +0 -113
  143. package/lib/_cjs/core/get_handler_url.js +0 -11
  144. package/lib/_cjs/core/handler.js +0 -216
  145. package/lib/_cjs/core/http_error.js +0 -6
  146. package/lib/_cjs/core/http_header.js +0 -142
  147. package/lib/_cjs/core/http_method.js +0 -12
  148. package/lib/_cjs/core/http_redirect.js +0 -11
  149. package/lib/_cjs/core/server.js +0 -219
  150. package/lib/_cjs/core/types.js +0 -8
  151. package/lib/_cjs/exports.js +0 -273
  152. package/lib/_cjs/index.js +0 -15
  153. package/lib/_cjs/plugins/base.js +0 -3
  154. package/lib/_cjs/plugins/compress.js +0 -18
  155. package/lib/_cjs/plugins/cookie.js +0 -18
  156. package/lib/_cjs/plugins/cors.js +0 -38
  157. package/lib/_cjs/plugins/file_parser.js +0 -28
  158. package/lib/_cjs/plugins/form_body_parser.js +0 -18
  159. package/lib/_cjs/plugins/ws_parser.js +0 -18
  160. package/lib/_cjs/plugins/xml_parser.js +0 -48
  161. package/lib/_cjs/services/ai.js +0 -48
  162. package/lib/_cjs/services/base.js +0 -3
  163. package/lib/_cjs/services/cache.js +0 -400
  164. package/lib/_cjs/services/captcha.js +0 -78
  165. package/lib/_cjs/services/crypto.js +0 -175
  166. package/lib/_cjs/services/db_value.js +0 -77
  167. package/lib/_cjs/services/dingtalk.js +0 -51
  168. package/lib/_cjs/services/dispose.js +0 -23
  169. package/lib/_cjs/services/emoji.js +0 -2034
  170. package/lib/_cjs/services/file_store.js +0 -67
  171. package/lib/_cjs/services/html.js +0 -17
  172. package/lib/_cjs/services/jwt.js +0 -65
  173. package/lib/_cjs/services/log.js +0 -108
  174. package/lib/_cjs/services/mail.js +0 -31
  175. package/lib/_cjs/services/pay.js +0 -191
  176. package/lib/_cjs/services/random.js +0 -51
  177. package/lib/_cjs/services/rate_limit.js +0 -54
  178. package/lib/_cjs/services/redis.js +0 -12
  179. package/lib/_cjs/services/sensitive_words.js +0 -61
  180. package/lib/_cjs/services/sms.js +0 -84
  181. package/lib/_cjs/types/dto.js +0 -3
  182. package/lib/_cjs/x.js +0 -35
  183. package/lib/cli/api_generator.d.ts +0 -74
  184. package/lib/cli/api_generator.js +0 -452
  185. package/lib/cli/build_util.d.ts +0 -17
  186. package/lib/cli/build_util.js +0 -236
  187. package/lib/cli/cli.d.ts +0 -2
  188. package/lib/cli/cli.js +0 -374
  189. package/lib/cli/css_register.js +0 -5
  190. package/lib/cli/deploy_util.d.ts +0 -23
  191. package/lib/cli/deploy_util.js +0 -70
  192. package/lib/cli/dev_util.d.ts +0 -8
  193. package/lib/cli/dev_util.js +0 -20
  194. package/lib/cli/env_util.d.ts +0 -45
  195. package/lib/cli/env_util.js +0 -246
  196. package/lib/cli/esbuild_register.js +0 -5
  197. package/lib/cli/template_util.d.ts +0 -18
  198. package/lib/cli/template_util.js +0 -95
  199. package/lib/core/ctx_storage.d.ts +0 -3
  200. package/lib/core/ctx_storage.js +0 -2
  201. package/lib/core/define_bus.d.ts +0 -37
  202. package/lib/core/define_bus.js +0 -27
  203. package/lib/core/define_cron.js +0 -9
  204. package/lib/core/define_handler.js +0 -48
  205. package/lib/core/define_hook.d.ts +0 -2
  206. package/lib/core/define_hook.js +0 -4
  207. package/lib/core/define_server.d.ts +0 -3
  208. package/lib/core/define_server.js +0 -6
  209. package/lib/core/define_task.js +0 -107
  210. package/lib/core/get_handler_url.d.ts +0 -2
  211. package/lib/core/get_handler_url.js +0 -7
  212. package/lib/core/handler.d.ts +0 -16
  213. package/lib/core/handler.js +0 -209
  214. package/lib/core/http_error.d.ts +0 -2
  215. package/lib/core/http_error.js +0 -2
  216. package/lib/core/http_header.d.ts +0 -856
  217. package/lib/core/http_header.js +0 -139
  218. package/lib/core/http_method.d.ts +0 -3
  219. package/lib/core/http_method.js +0 -8
  220. package/lib/core/http_redirect.d.ts +0 -5
  221. package/lib/core/http_redirect.js +0 -6
  222. package/lib/core/server.d.ts +0 -20
  223. package/lib/core/server.js +0 -213
  224. package/lib/core/types.d.ts +0 -265
  225. package/lib/core/types.js +0 -4
  226. package/lib/exports.d.ts +0 -45
  227. package/lib/exports.js +0 -47
  228. package/lib/index.d.ts +0 -2
  229. package/lib/index.js +0 -3
  230. package/lib/plugins/base.d.ts +0 -4
  231. package/lib/plugins/base.js +0 -1
  232. package/lib/plugins/compress.d.ts +0 -13
  233. package/lib/plugins/compress.js +0 -12
  234. package/lib/plugins/cookie.d.ts +0 -13
  235. package/lib/plugins/cookie.js +0 -12
  236. package/lib/plugins/cors.d.ts +0 -22
  237. package/lib/plugins/cors.js +0 -32
  238. package/lib/plugins/file_parser.d.ts +0 -16
  239. package/lib/plugins/file_parser.js +0 -22
  240. package/lib/plugins/form_body_parser.d.ts +0 -13
  241. package/lib/plugins/form_body_parser.js +0 -12
  242. package/lib/plugins/ws_parser.d.ts +0 -13
  243. package/lib/plugins/ws_parser.js +0 -12
  244. package/lib/plugins/xml_parser.d.ts +0 -19
  245. package/lib/plugins/xml_parser.js +0 -43
  246. package/lib/services/ai.d.ts +0 -31
  247. package/lib/services/ai.js +0 -43
  248. package/lib/services/base.d.ts +0 -4
  249. package/lib/services/base.js +0 -1
  250. package/lib/services/cache.d.ts +0 -173
  251. package/lib/services/cache.js +0 -394
  252. package/lib/services/captcha.d.ts +0 -65
  253. package/lib/services/captcha.js +0 -72
  254. package/lib/services/crypto.d.ts +0 -110
  255. package/lib/services/db_value.d.ts +0 -60
  256. package/lib/services/db_value.js +0 -72
  257. package/lib/services/dingtalk.d.ts +0 -39
  258. package/lib/services/dingtalk.js +0 -45
  259. package/lib/services/dispose.d.ts +0 -17
  260. package/lib/services/dispose.js +0 -17
  261. package/lib/services/emoji.d.ts +0 -10
  262. package/lib/services/emoji.js +0 -2029
  263. package/lib/services/file_store.d.ts +0 -49
  264. package/lib/services/file_store.js +0 -61
  265. package/lib/services/html.d.ts +0 -11
  266. package/lib/services/html.js +0 -12
  267. package/lib/services/jwt.d.ts +0 -34
  268. package/lib/services/jwt.js +0 -59
  269. package/lib/services/log.d.ts +0 -37
  270. package/lib/services/log.js +0 -102
  271. package/lib/services/mail.d.ts +0 -23
  272. package/lib/services/mail.js +0 -25
  273. package/lib/services/pay.d.ts +0 -123
  274. package/lib/services/pay.js +0 -185
  275. package/lib/services/random.d.ts +0 -27
  276. package/lib/services/random.js +0 -45
  277. package/lib/services/rate_limit.d.ts +0 -37
  278. package/lib/services/rate_limit.js +0 -49
  279. package/lib/services/redis.d.ts +0 -12
  280. package/lib/services/redis.js +0 -7
  281. package/lib/services/sensitive_words.d.ts +0 -29
  282. package/lib/services/sensitive_words.js +0 -56
  283. package/lib/services/sms.d.ts +0 -40
  284. package/lib/services/sms.js +0 -78
  285. package/lib/types/dto.d.ts +0 -86
  286. package/lib/types/dto.js +0 -1
  287. package/lib/x.d.ts +0 -17
  288. package/lib/x.js +0 -30
  289. /package/lib/{cli/css_register.d.ts → core/types.mjs} +0 -0
  290. /package/lib/{cli/esbuild_register.d.ts → plugins/base.mjs} +0 -0
@@ -0,0 +1,860 @@
1
+ // src/core/http_header.ts
2
+ /**
3
+ [...$0.querySelectorAll('tr')].map(v => v.querySelector('td:nth-child(1)').innerText.trim().split(',').map(name => name.replace(/\[.*?\]/g, '').trim()).map((name) => ({
4
+ name: name,
5
+ description: v.querySelector('td:nth-child(2)').innerText.replace(/\[.*?\]/g, '').trim(),
6
+ example: v.querySelector('td:nth-child(3)').innerText.trim(),
7
+ pascalName: name.replace(/\-/g, '_').toUpperCase()
8
+ }))).flat().map(item => `
9
+ ${'/'}**
10
+ * ${item.description}
11
+ *
12
+ * @example
13
+ * ${item.example}
14
+ *${'/'}
15
+ ${item.pascalName} = '${item.name}',
16
+ `).join('\n\n')
17
+ */
18
+ let HttpRequestHeader = /* @__PURE__ */ function(HttpRequestHeader) {
19
+ /**
20
+ * Acceptable instance-manipulations for the request.
21
+ *
22
+ * @example
23
+ * A-IM: feed
24
+ */
25
+ HttpRequestHeader["A_IM"] = "A-IM";
26
+ /**
27
+ * Media type(s) that is/are acceptable for the response. See Content negotiation.
28
+ *
29
+ * @example
30
+ * Accept: text/html
31
+ */
32
+ HttpRequestHeader["ACCEPT"] = "Accept";
33
+ /**
34
+ * Character sets that are acceptable.
35
+ *
36
+ * @example
37
+ * Accept-Charset: utf-8
38
+ */
39
+ HttpRequestHeader["ACCEPT_CHARSET"] = "Accept-Charset";
40
+ /**
41
+ * Acceptable version in time.
42
+ *
43
+ * @example
44
+ * Accept-Datetime: Thu, 31 May 2007 20:35:00 GMT
45
+ */
46
+ HttpRequestHeader["ACCEPT_DATETIME"] = "Accept-Datetime";
47
+ /**
48
+ * List of acceptable encodings. See HTTP compression.
49
+ *
50
+ * @example
51
+ * Accept-Encoding: gzip, deflate
52
+ */
53
+ HttpRequestHeader["ACCEPT_ENCODING"] = "Accept-Encoding";
54
+ /**
55
+ * List of acceptable human languages for response. See Content negotiation.
56
+ *
57
+ * @example
58
+ * Accept-Language: en-US
59
+ */
60
+ HttpRequestHeader["ACCEPT_LANGUAGE"] = "Accept-Language";
61
+ /**
62
+ * Initiates a request for cross-origin resource sharing with Origin (below).
63
+ *
64
+ * @example
65
+ * Access-Control-Request-Method: GET
66
+ */
67
+ HttpRequestHeader["ACCESS_CONTROL_REQUEST_METHOD"] = "Access-Control-Request-Method";
68
+ /**
69
+ * Initiates a request for cross-origin resource sharing with Origin (below).
70
+ *
71
+ * @example
72
+ * Access-Control-Request-Method: GET
73
+ */
74
+ HttpRequestHeader["ACCESS_CONTROL_REQUEST_HEADERS"] = "Access-Control-Request-Headers";
75
+ /**
76
+ * Authentication credentials for HTTP authentication.
77
+ *
78
+ * @example
79
+ * Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
80
+ */
81
+ HttpRequestHeader["AUTHORIZATION"] = "Authorization";
82
+ /**
83
+ * Used to specify directives that must be obeyed by all caching mechanisms along the request-response chain.
84
+ *
85
+ * @example
86
+ * Cache-Control: no-cache
87
+ */
88
+ HttpRequestHeader["CACHE_CONTROL"] = "Cache-Control";
89
+ /**
90
+ * Control options for the current connection and list of hop-by-hop request fields.
91
+ Must not be used with HTTP/2.
92
+ *
93
+ * @example
94
+ * Connection: keep-alive
95
+ Connection: Upgrade
96
+ */
97
+ HttpRequestHeader["CONNECTION"] = "Connection";
98
+ /**
99
+ * The type of encoding used on the data. See HTTP compression.
100
+ *
101
+ * @example
102
+ * Content-Encoding: gzip
103
+ */
104
+ HttpRequestHeader["CONTENT_ENCODING"] = "Content-Encoding";
105
+ /**
106
+ * The length of the request body in octets (8-bit bytes).
107
+ *
108
+ * @example
109
+ * Content-Length: 348
110
+ */
111
+ HttpRequestHeader["CONTENT_LENGTH"] = "Content-Length";
112
+ /**
113
+ * A Base64-encoded binary MD5 sum of the content of the request body.
114
+ *
115
+ * @example
116
+ * Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ==
117
+ */
118
+ HttpRequestHeader["CONTENT_MD5"] = "Content-MD5";
119
+ /**
120
+ * The Media type of the body of the request (used with POST and PUT requests).
121
+ *
122
+ * @example
123
+ * Content-Type: application/x-www-form-urlencoded
124
+ */
125
+ HttpRequestHeader["CONTENT_TYPE"] = "Content-Type";
126
+ /**
127
+ * An HTTP cookie previously sent by the server with Set-Cookie (below).
128
+ *
129
+ * @example
130
+ * Cookie: $Version=1; Skin=new;
131
+ */
132
+ HttpRequestHeader["COOKIE"] = "Cookie";
133
+ /**
134
+ * The date and time at which the message was originated (in "HTTP-date" format as defined by RFC 7231 Date/Time Formats).
135
+ *
136
+ * @example
137
+ * Date: Tue, 15 Nov 1994 08:12:31 GMT
138
+ */
139
+ HttpRequestHeader["DATE"] = "Date";
140
+ /**
141
+ * Indicates that particular server behaviors are required by the client.
142
+ *
143
+ * @example
144
+ * Expect: 100-continue
145
+ */
146
+ HttpRequestHeader["EXPECT"] = "Expect";
147
+ /**
148
+ * Disclose original information of a client connecting to a web server through an HTTP proxy.
149
+ *
150
+ * @example
151
+ * Forwarded: for=192.0.2.60;proto=http;by=203.0.113.43 Forwarded: for=192.0.2.43, for=198.51.100.17
152
+ */
153
+ HttpRequestHeader["FORWARDED"] = "Forwarded";
154
+ /**
155
+ * The email address of the user making the request.
156
+ *
157
+ * @example
158
+ * From: user@example.com
159
+ */
160
+ HttpRequestHeader["FROM"] = "From";
161
+ /**
162
+ * The domain name of the server (for virtual hosting), and the TCP port number on which the server is listening. The port number may be omitted if the port is the standard port for the service requested.
163
+ Mandatory since HTTP/1.1. If the request is generated directly in HTTP/2, it should not be used.
164
+ *
165
+ * @example
166
+ * Host: en.wikipedia.org:8080
167
+ Host: en.wikipedia.org
168
+ */
169
+ HttpRequestHeader["HOST"] = "Host";
170
+ /**
171
+ * A request that upgrades from HTTP/1.1 to HTTP/2 MUST include exactly one HTTP2-Setting header field. The HTTP2-Settings header field is a connection-specific header field that includes parameters that govern the HTTP/2 connection, provided in anticipation of the server accepting the request to upgrade.
172
+ *
173
+ * @example
174
+ * HTTP2-Settings: token64
175
+ */
176
+ HttpRequestHeader["HTTP2_SETTINGS"] = "HTTP2-Settings";
177
+ /**
178
+ * Only perform the action if the client supplied entity matches the same entity on the server. This is mainly for methods like PUT to only update a resource if it has not been modified since the user last updated it.
179
+ *
180
+ * @example
181
+ * If-Match: "737060cd8c284d8af7ad3082f209582d"
182
+ */
183
+ HttpRequestHeader["IF_MATCH"] = "If-Match";
184
+ /**
185
+ * Allows a 304 Not Modified to be returned if content is unchanged.
186
+ *
187
+ * @example
188
+ * If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
189
+ */
190
+ HttpRequestHeader["IF_MODIFIED_SINCE"] = "If-Modified-Since";
191
+ /**
192
+ * Allows a 304 Not Modified to be returned if content is unchanged, see HTTP ETag.
193
+ *
194
+ * @example
195
+ * If-None-Match: "737060cd8c284d8af7ad3082f209582d"
196
+ */
197
+ HttpRequestHeader["IF_NONE_MATCH"] = "If-None-Match";
198
+ /**
199
+ * If the entity is unchanged, send me the part(s) that I am missing; otherwise, send me the entire new entity.
200
+ *
201
+ * @example
202
+ * If-Range: "737060cd8c284d8af7ad3082f209582d"
203
+ */
204
+ HttpRequestHeader["IF_RANGE"] = "If-Range";
205
+ /**
206
+ * Only send the response if the entity has not been modified since a specific time.
207
+ *
208
+ * @example
209
+ * If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
210
+ */
211
+ HttpRequestHeader["IF_UNMODIFIED_SINCE"] = "If-Unmodified-Since";
212
+ /**
213
+ * Limit the number of times the message can be forwarded through proxies or gateways.
214
+ *
215
+ * @example
216
+ * Max-Forwards: 10
217
+ */
218
+ HttpRequestHeader["MAX_FORWARDS"] = "Max-Forwards";
219
+ /**
220
+ * Initiates a request for cross-origin resource sharing (asks server for Access-Control-* response fields).
221
+ *
222
+ * @example
223
+ * Origin: http://www.example-social-network.com
224
+ */
225
+ HttpRequestHeader["ORIGIN"] = "Origin";
226
+ /**
227
+ * Implementation-specific fields that may have various effects anywhere along the request-response chain.
228
+ *
229
+ * @example
230
+ * Pragma: no-cache
231
+ */
232
+ HttpRequestHeader["PRAGMA"] = "Pragma";
233
+ /**
234
+ * Authorization credentials for connecting to a proxy.
235
+ *
236
+ * @example
237
+ * Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
238
+ */
239
+ HttpRequestHeader["PROXY_AUTHORIZATION"] = "Proxy-Authorization";
240
+ /**
241
+ * Request only part of an entity. Bytes are numbered from 0. See Byte serving.
242
+ *
243
+ * @example
244
+ * Range: bytes=500-999
245
+ */
246
+ HttpRequestHeader["RANGE"] = "Range";
247
+ /**
248
+ * This is the address of the previous web page from which a link to the currently requested page was followed. (The word "referrer" has been misspelled in the RFC as well as in most implementations to the point that it has become standard usage and is considered correct terminology)
249
+ *
250
+ * @example
251
+ * Referer: http://en.wikipedia.org/wiki/Main_Page
252
+ */
253
+ HttpRequestHeader["REFERER"] = "Referer";
254
+ /**
255
+ * The transfer encodings the user agent is willing to accept: the same values as for the response header field Transfer-Encoding can be used, plus the "trailers" value (related to the "chunked" transfer method) to notify the server it expects to receive additional fields in the trailer after the last, zero-sized, chunk.
256
+ Only trailers is supported in HTTP/2.
257
+ *
258
+ * @example
259
+ * TE: trailers, deflate
260
+ */
261
+ HttpRequestHeader["TE"] = "TE";
262
+ /**
263
+ * The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer coding.
264
+ *
265
+ * @example
266
+ * Trailer: Max-Forwards
267
+ */
268
+ HttpRequestHeader["TRAILER"] = "Trailer";
269
+ /**
270
+ * The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
271
+ Must not be used with HTTP/2.
272
+ *
273
+ * @example
274
+ * Transfer-Encoding: chunked
275
+ */
276
+ HttpRequestHeader["TRANSFER_ENCODING"] = "Transfer-Encoding";
277
+ /**
278
+ * The user agent string of the user agent.
279
+ *
280
+ * @example
281
+ * User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
282
+ */
283
+ HttpRequestHeader["USER_AGENT"] = "User-Agent";
284
+ /**
285
+ * Ask the server to upgrade to another protocol.
286
+ Must not be used in HTTP/2.
287
+ *
288
+ * @example
289
+ * Upgrade: h2c, HTTPS/1.3, IRC/6.9, RTA/x11, websocket
290
+ */
291
+ HttpRequestHeader["UPGRADE"] = "Upgrade";
292
+ /**
293
+ * Informs the server of proxies through which the request was sent.
294
+ *
295
+ * @example
296
+ * Via: 1.0 fred, 1.1 example.com (Apache/1.1)
297
+ */
298
+ HttpRequestHeader["VIA"] = "Via";
299
+ /**
300
+ * A general warning about possible problems with the entity body.
301
+ *
302
+ * @example
303
+ * Warning: 199 Miscellaneous warning
304
+ */
305
+ HttpRequestHeader["WARNING"] = "Warning";
306
+ /**
307
+ * Tells a server which (presumably in the middle of a HTTP -> HTTPS migration) hosts mixed content that the client would prefer redirection to HTTPS and can handle Content-Security-Policy: upgrade-insecure-requests
308
+ Must not be used with HTTP/2
309
+ *
310
+ * @example
311
+ * Upgrade-Insecure-Requests: 1
312
+ */
313
+ HttpRequestHeader["UPGRADE_INSECURE_REQUESTS"] = "Upgrade-Insecure-Requests";
314
+ /**
315
+ * Mainly used to identify Ajax requests (most JavaScript frameworks send this field with value of XMLHttpRequest); also identifies Android apps using WebView
316
+ *
317
+ * @example
318
+ * X-Requested-With: XMLHttpRequest
319
+ */
320
+ HttpRequestHeader["X_REQUESTED_WITH"] = "X-Requested-With";
321
+ /**
322
+ * Requests a web application to disable their tracking of a user. This is Mozilla's version of the X-Do-Not-Track header field (since Firefox 4.0 Beta 11). Safari and IE9 also have support for this field. On March 7, 2011, a draft proposal was submitted to IETF. The W3C Tracking Protection Working Group is producing a specification.
323
+ *
324
+ * @example
325
+ * DNT: 1 (Do Not Track Enabled)
326
+ DNT: 0 (Do Not Track Disabled)
327
+ */
328
+ HttpRequestHeader["DNT"] = "DNT";
329
+ /**
330
+ * A de facto standard for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer. Superseded by Forwarded header.
331
+ *
332
+ * @example
333
+ * X-Forwarded-For: client1, proxy1, proxy2
334
+ X-Forwarded-For: 129.78.138.66, 129.78.64.103
335
+ */
336
+ HttpRequestHeader["X_FORWARDED_FOR"] = "X-Forwarded-For";
337
+ /**
338
+ * A de facto standard for identifying the original host requested by the client in the Host HTTP request header, since the host name and/or port of the reverse proxy (load balancer) may differ from the origin server handling the request. Superseded by Forwarded header.
339
+ *
340
+ * @example
341
+ * X-Forwarded-Host: en.wikipedia.org:8080
342
+ X-Forwarded-Host: en.wikipedia.org
343
+ */
344
+ HttpRequestHeader["X_FORWARDED_HOST"] = "X-Forwarded-Host";
345
+ /**
346
+ * A de facto standard for identifying the originating protocol of an HTTP request, since a reverse proxy (or a load balancer) may communicate with a web server using HTTP even if the request to the reverse proxy is HTTPS. An alternative form of the header (X-ProxyUser-Ip) is used by Google clients talking to Google servers. Superseded by Forwarded header.
347
+ *
348
+ * @example
349
+ * X-Forwarded-Proto: https
350
+ */
351
+ HttpRequestHeader["X_FORWARDED_PROTO"] = "X-Forwarded-Proto";
352
+ /**
353
+ * Non-standard header field used by Microsoft applications and load-balancers
354
+ *
355
+ * @example
356
+ * Front-End-Https: on
357
+ */
358
+ HttpRequestHeader["FRONT_END_HTTPS"] = "Front-End-Https";
359
+ /**
360
+ * Requests a web application to override the method specified in the request (typically POST) with the method given in the header field (typically PUT or DELETE). This can be used when a user agent or firewall prevents PUT or DELETE methods from being sent directly (note that this is either a bug in the software component, which ought to be fixed, or an intentional configuration, in which case bypassing it may be the wrong thing to do).
361
+ *
362
+ * @example
363
+ * X-HTTP-Method-Override: DELETE
364
+ */
365
+ HttpRequestHeader["X_HTTP_METHOD_OVERRIDE"] = "X-Http-Method-Override";
366
+ /**
367
+ * Allows easier parsing of the MakeModel/Firmware that is usually found in the User-Agent String of AT&T Devices
368
+ *
369
+ * @example
370
+ * X-Att-Deviceid: GT-P7320/P7320XXLPG
371
+ */
372
+ HttpRequestHeader["X_ATT_DEVICEID"] = "X-ATT-DeviceId";
373
+ /**
374
+ * Links to an XML file on the Internet with a full description and details about the device currently connecting. In the example to the right is an XML file for an AT&T Samsung Galaxy S2.
375
+ *
376
+ * @example
377
+ * x-wap-profile: http://wap.samsungmobile.com/uaprof/SGH-I777.xml
378
+ */
379
+ HttpRequestHeader["X_WAP_PROFILE"] = "X-Wap-Profile";
380
+ /**
381
+ * Implemented as a misunderstanding of the HTTP specifications. Common because of mistakes in implementations of early HTTP versions. Has exactly the same functionality as standard Connection field.
382
+ Must not be used with HTTP/2.
383
+ *
384
+ * @example
385
+ * Proxy-Connection: keep-alive
386
+ */
387
+ HttpRequestHeader["PROXY_CONNECTION"] = "Proxy-Connection";
388
+ /**
389
+ * Server-side deep packet insertion of a unique ID identifying customers of Verizon Wireless; also known as "perma-cookie" or "supercookie"
390
+ *
391
+ * @example
392
+ * X-UIDH: ...
393
+ */
394
+ HttpRequestHeader["X_UIDH"] = "X-UIDH";
395
+ /**
396
+ * Used to prevent cross-site request forgery. Alternative header names are: X-CSRFToken and X-XSRF-TOKEN
397
+ *
398
+ * @example
399
+ * X-Csrf-Token: i8XNjC4b8KVok4uw5RftR38Wgp2BFwql
400
+ */
401
+ HttpRequestHeader["X_CSRF_TOKEN"] = "X-Csrf-Token";
402
+ /**
403
+ * Correlates HTTP requests between a client and server.
404
+ *
405
+ * @example
406
+ * X-Request-ID: f058ebd6-02f7-4d3f-942e-904344e8cde5
407
+ */
408
+ HttpRequestHeader["X_REQUEST_ID"] = "X-Request-ID";
409
+ /**
410
+ * Correlates HTTP requests between a client and server.
411
+ *
412
+ * @example
413
+ * X-Request-ID: f058ebd6-02f7-4d3f-942e-904344e8cde5
414
+ */
415
+ HttpRequestHeader["X_CORRELATION_ID"] = "X-Correlation-ID";
416
+ /**
417
+ * The Save-Data client hint request header available in Chrome, Opera, and Yandex browsers lets developers deliver lighter, faster applications to users who opt-in to data saving mode in their browser.
418
+ *
419
+ * @example
420
+ * Save-Data: on
421
+ */
422
+ HttpRequestHeader["SAVE_DATA"] = "Save-Data";
423
+ return HttpRequestHeader;
424
+ }({});
425
+ let HttpResponseHeader = /* @__PURE__ */ function(HttpResponseHeader) {
426
+ /**
427
+ * Specifying which web sites can participate in cross-origin resource sharing
428
+ *
429
+ * @example
430
+ * Access-Control-Allow-Origin: *
431
+ */
432
+ HttpResponseHeader["ACCESS_CONTROL_ALLOW_ORIGIN"] = "Access-Control-Allow-Origin";
433
+ /**
434
+ * Specifying which web sites can participate in cross-origin resource sharing
435
+ *
436
+ * @example
437
+ * Access-Control-Allow-Origin: *
438
+ */
439
+ HttpResponseHeader["ACCESS_CONTROL_ALLOW_CREDENTIALS"] = "Access-Control-Allow-Credentials";
440
+ /**
441
+ * Specifying which web sites can participate in cross-origin resource sharing
442
+ *
443
+ * @example
444
+ * Access-Control-Allow-Origin: *
445
+ */
446
+ HttpResponseHeader["ACCESS_CONTROL_EXPOSE_HEADERS"] = "Access-Control-Expose-Headers";
447
+ /**
448
+ * Specifying which web sites can participate in cross-origin resource sharing
449
+ *
450
+ * @example
451
+ * Access-Control-Allow-Origin: *
452
+ */
453
+ HttpResponseHeader["ACCESS_CONTROL_MAX_AGE"] = "Access-Control-Max-Age";
454
+ /**
455
+ * Specifying which web sites can participate in cross-origin resource sharing
456
+ *
457
+ * @example
458
+ * Access-Control-Allow-Origin: *
459
+ */
460
+ HttpResponseHeader["ACCESS_CONTROL_ALLOW_METHODS"] = "Access-Control-Allow-Methods";
461
+ /**
462
+ * Specifying which web sites can participate in cross-origin resource sharing
463
+ *
464
+ * @example
465
+ * Access-Control-Allow-Origin: *
466
+ */
467
+ HttpResponseHeader["ACCESS_CONTROL_ALLOW_HEADERS"] = "Access-Control-Allow-Headers";
468
+ /**
469
+ * Specifies which patch document formats this server supports
470
+ *
471
+ * @example
472
+ * Accept-Patch: text/example;charset=utf-8
473
+ */
474
+ HttpResponseHeader["ACCEPT_PATCH"] = "Accept-Patch";
475
+ /**
476
+ * What partial content range types this server supports via byte serving
477
+ *
478
+ * @example
479
+ * Accept-Ranges: bytes
480
+ */
481
+ HttpResponseHeader["ACCEPT_RANGES"] = "Accept-Ranges";
482
+ /**
483
+ * The age the object has been in a proxy cache in seconds
484
+ *
485
+ * @example
486
+ * Age: 12
487
+ */
488
+ HttpResponseHeader["AGE"] = "Age";
489
+ /**
490
+ * Valid methods for a specified resource. To be used for a 405 Method not allowed
491
+ *
492
+ * @example
493
+ * Allow: GET, HEAD
494
+ */
495
+ HttpResponseHeader["ALLOW"] = "Allow";
496
+ /**
497
+ * A server uses "Alt-Svc" header (meaning Alternative Services) to indicate that its resources can also be accessed at a different network location (host or port) or using a different protocol
498
+ When using HTTP/2, servers should instead send an ALTSVC frame.
499
+ *
500
+ * @example
501
+ * Alt-Svc: http/1.1="http2.example.com:8001"; ma=7200
502
+ */
503
+ HttpResponseHeader["ALT_SVC"] = "Alt-Svc";
504
+ /**
505
+ * Tells all caching mechanisms from server to client whether they may cache this object. It is measured in seconds
506
+ *
507
+ * @example
508
+ * Cache-Control: max-age=3600
509
+ */
510
+ HttpResponseHeader["CACHE_CONTROL"] = "Cache-Control";
511
+ /**
512
+ * Control options for the current connection and list of hop-by-hop response fields.
513
+ Must not be used with HTTP/2.
514
+ *
515
+ * @example
516
+ * Connection: close
517
+ */
518
+ HttpResponseHeader["CONNECTION"] = "Connection";
519
+ /**
520
+ * An opportunity to raise a "File Download" dialogue box for a known MIME type with binary format or suggest a filename for dynamic content. Quotes are necessary with special characters.
521
+ *
522
+ * @example
523
+ * Content-Disposition: attachment; filename="fname.ext"
524
+ */
525
+ HttpResponseHeader["CONTENT_DISPOSITION"] = "Content-Disposition";
526
+ /**
527
+ * The type of encoding used on the data. See HTTP compression.
528
+ *
529
+ * @example
530
+ * Content-Encoding: gzip
531
+ */
532
+ HttpResponseHeader["CONTENT_ENCODING"] = "Content-Encoding";
533
+ /**
534
+ * The natural language or languages of the intended audience for the enclosed content
535
+ *
536
+ * @example
537
+ * Content-Language: da
538
+ */
539
+ HttpResponseHeader["CONTENT_LANGUAGE"] = "Content-Language";
540
+ /**
541
+ * The length of the response body in octets (8-bit bytes)
542
+ *
543
+ * @example
544
+ * Content-Length: 348
545
+ */
546
+ HttpResponseHeader["CONTENT_LENGTH"] = "Content-Length";
547
+ /**
548
+ * An alternate location for the returned data
549
+ *
550
+ * @example
551
+ * Content-Location: /index.htm
552
+ */
553
+ HttpResponseHeader["CONTENT_LOCATION"] = "Content-Location";
554
+ /**
555
+ * A Base64-encoded binary MD5 sum of the content of the response
556
+ *
557
+ * @example
558
+ * Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ==
559
+ */
560
+ HttpResponseHeader["CONTENT_MD5"] = "Content-MD5";
561
+ /**
562
+ * Where in a full body message this partial message belongs
563
+ *
564
+ * @example
565
+ * Content-Range: bytes 21010-47021/47022
566
+ */
567
+ HttpResponseHeader["CONTENT_RANGE"] = "Content-Range";
568
+ /**
569
+ * The MIME type of this content
570
+ *
571
+ * @example
572
+ * Content-Type: text/html; charset=utf-8
573
+ */
574
+ HttpResponseHeader["CONTENT_TYPE"] = "Content-Type";
575
+ /**
576
+ * The date and time that the message was sent (in "HTTP-date" format as defined by RFC 7231)
577
+ *
578
+ * @example
579
+ * Date: Tue, 15 Nov 1994 08:12:31 GMT
580
+ */
581
+ HttpResponseHeader["DATE"] = "Date";
582
+ /**
583
+ * Specifies the delta-encoding entity tag of the response.
584
+ *
585
+ * @example
586
+ * Delta-Base: "abc"
587
+ */
588
+ HttpResponseHeader["DELTA_BASE"] = "Delta-Base";
589
+ /**
590
+ * An identifier for a specific version of a resource, often a message digest
591
+ *
592
+ * @example
593
+ * ETag: "737060cd8c284d8af7ad3082f209582d"
594
+ */
595
+ HttpResponseHeader["ETAG"] = "ETag";
596
+ /**
597
+ * Gives the date/time after which the response is considered stale (in "HTTP-date" format as defined by RFC 7231)
598
+ *
599
+ * @example
600
+ * Expires: Thu, 01 Dec 1994 16:00:00 GMT
601
+ */
602
+ HttpResponseHeader["EXPIRES"] = "Expires";
603
+ /**
604
+ * Instance-manipulations applied to the response.
605
+ *
606
+ * @example
607
+ * IM: feed
608
+ */
609
+ HttpResponseHeader["IM"] = "IM";
610
+ /**
611
+ * The last modified date for the requested object (in "HTTP-date" format as defined by RFC 7231)
612
+ *
613
+ * @example
614
+ * Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
615
+ */
616
+ HttpResponseHeader["LAST_MODIFIED"] = "Last-Modified";
617
+ /**
618
+ * Used to express a typed relationship with another resource, where the relation type is defined by RFC 5988
619
+ *
620
+ * @example
621
+ * Link: </feed>; rel="alternate"[50]
622
+ */
623
+ HttpResponseHeader["LINK"] = "Link";
624
+ /**
625
+ * Used in redirection, or when a new resource has been created.
626
+ *
627
+ * @example
628
+ * Example 1: Location: http://www.w3.org/pub/WWW/People.html
629
+ Example 2: Location: /pub/WWW/People.html
630
+ */
631
+ HttpResponseHeader["LOCATION"] = "Location";
632
+ /**
633
+ * This field is supposed to set P3P policy, in the form of P3P:CP="your_compact_policy". However, P3P did not take off, most browsers have never fully implemented it, a lot of websites set this field with fake policy text, that was enough to fool browsers the existence of P3P policy and grant permissions for third party cookies.
634
+ *
635
+ * @example
636
+ * P3P: CP="This is not a P3P policy! See https://en.wikipedia.org/wiki/Special:CentralAutoLogin/P3P for more info."
637
+ */
638
+ HttpResponseHeader["P3P"] = "P3P";
639
+ /**
640
+ * Implementation-specific fields that may have various effects anywhere along the request-response chain.
641
+ *
642
+ * @example
643
+ * Pragma: no-cache
644
+ */
645
+ HttpResponseHeader["PRAGMA"] = "Pragma";
646
+ /**
647
+ * Request authentication to access the proxy.
648
+ *
649
+ * @example
650
+ * Proxy-Authenticate: Basic
651
+ */
652
+ HttpResponseHeader["PROXY_AUTHENTICATE"] = "Proxy-Authenticate";
653
+ /**
654
+ * HTTP Public Key Pinning, announces hash of website's authentic TLS certificate
655
+ *
656
+ * @example
657
+ * Public-Key-Pins: max-age=2592000; pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=";
658
+ */
659
+ HttpResponseHeader["PUBLIC_KEY_PINS"] = "Public-Key-Pins";
660
+ /**
661
+ * If an entity is temporarily unavailable, this instructs the client to try again later. Value could be a specified period of time (in seconds) or a HTTP-date.
662
+ *
663
+ * @example
664
+ * Example 1: Retry-After: 120
665
+ Example 2: Retry-After: Fri, 07 Nov 2014 23:59:59 GMT
666
+ */
667
+ HttpResponseHeader["RETRY_AFTER"] = "Retry-After";
668
+ /**
669
+ * A name for the server
670
+ *
671
+ * @example
672
+ * Server: Apache/2.4.1 (Unix)
673
+ */
674
+ HttpResponseHeader["SERVER"] = "Server";
675
+ /**
676
+ * An HTTP cookie
677
+ *
678
+ * @example
679
+ * Set-Cookie: UserID=JohnDoe; Max-Age=3600; Version=1
680
+ */
681
+ HttpResponseHeader["SET_COOKIE"] = "Set-Cookie";
682
+ /**
683
+ * A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains.
684
+ *
685
+ * @example
686
+ * Strict-Transport-Security: max-age=16070400; includeSubDomains
687
+ */
688
+ HttpResponseHeader["STRICT_TRANSPORT_SECURITY"] = "Strict-Transport-Security";
689
+ /**
690
+ * The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer coding.
691
+ *
692
+ * @example
693
+ * Trailer: Max-Forwards
694
+ */
695
+ HttpResponseHeader["TRAILER"] = "Trailer";
696
+ /**
697
+ * The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
698
+ Must not be used with HTTP/2.
699
+ *
700
+ * @example
701
+ * Transfer-Encoding: chunked
702
+ */
703
+ HttpResponseHeader["TRANSFER_ENCODING"] = "Transfer-Encoding";
704
+ /**
705
+ * Tracking Status header, value suggested to be sent in response to a DNT(do-not-track), possible values:
706
+ "!" — under construction
707
+ "?" — dynamic
708
+ "G" — gateway to multiple parties
709
+ "N" — not tracking
710
+ "T" — tracking
711
+ "C" — tracking with consent
712
+ "P" — tracking only if consented
713
+ "D" — disregarding DNT
714
+ "U" — updated
715
+ *
716
+ * @example
717
+ * Tk: ?
718
+ */
719
+ HttpResponseHeader["TK"] = "Tk";
720
+ /**
721
+ * Ask the client to upgrade to another protocol.
722
+ Must not be used in HTTP/2
723
+ *
724
+ * @example
725
+ * Upgrade: h2c, HTTPS/1.3, IRC/6.9, RTA/x11, websocket
726
+ */
727
+ HttpResponseHeader["UPGRADE"] = "Upgrade";
728
+ /**
729
+ * Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server.
730
+ *
731
+ * @example
732
+ * Example 1: Vary: *
733
+ Example 2: Vary: Accept-Language
734
+ */
735
+ HttpResponseHeader["VARY"] = "Vary";
736
+ /**
737
+ * Informs the client of proxies through which the response was sent.
738
+ *
739
+ * @example
740
+ * Via: 1.0 fred, 1.1 example.com (Apache/1.1)
741
+ */
742
+ HttpResponseHeader["VIA"] = "Via";
743
+ /**
744
+ * A general warning about possible problems with the entity body.
745
+ *
746
+ * @example
747
+ * Warning: 199 Miscellaneous warning
748
+ */
749
+ HttpResponseHeader["WARNING"] = "Warning";
750
+ /**
751
+ * Indicates the authentication scheme that should be used to access the requested entity.
752
+ *
753
+ * @example
754
+ * WWW-Authenticate: Basic
755
+ */
756
+ HttpResponseHeader["WWW_AUTHENTICATE"] = "WWW-Authenticate";
757
+ /**
758
+ * Clickjacking protection: deny - no rendering within a frame, sameorigin - no rendering if origin mismatch, allow-from - allow from specified location, allowall - non-standard, allow from any location
759
+ *
760
+ * @example
761
+ * X-Frame-Options: deny
762
+ */
763
+ HttpResponseHeader["X_FRAME_OPTIONS"] = "X-Frame-Options";
764
+ /**
765
+ * Content Security Policy definition.
766
+ *
767
+ * @example
768
+ * X-WebKit-CSP: default-src 'self'
769
+ */
770
+ HttpResponseHeader["CONTENT_SECURITY_POLICY"] = "Content-Security-Policy";
771
+ /**
772
+ * Content Security Policy definition.
773
+ *
774
+ * @example
775
+ * X-WebKit-CSP: default-src 'self'
776
+ */
777
+ HttpResponseHeader["X_CONTENT_SECURITY_POLICY"] = "X-Content-Security-Policy";
778
+ /**
779
+ * Content Security Policy definition.
780
+ *
781
+ * @example
782
+ * X-WebKit-CSP: default-src 'self'
783
+ */
784
+ HttpResponseHeader["X_WEBKIT_CSP"] = "X-WebKit-CSP";
785
+ /**
786
+ * Used in redirection, or when a new resource has been created. This refresh redirects after 5 seconds. Header extension introduced by Netscape and supported by most web browsers.
787
+ *
788
+ * @example
789
+ * Refresh: 5; url=http://www.w3.org/pub/WWW/People.html
790
+ */
791
+ HttpResponseHeader["REFRESH"] = "Refresh";
792
+ /**
793
+ * CGI header field specifying the status of the HTTP response. Normal HTTP responses use a separate "Status-Line" instead, defined by RFC 7230.
794
+ *
795
+ * @example
796
+ * Status: 200 OK
797
+ */
798
+ HttpResponseHeader["STATUS"] = "Status";
799
+ /**
800
+ * The Timing-Allow-Origin response header specifies origins that are allowed to see values of attributes retrieved via features of the Resource Timing API, which would otherwise be reported as zero due to cross-origin restrictions.
801
+ *
802
+ * @example
803
+ * Timing-Allow-Origin: *
804
+ Timing-Allow-Origin: <origin>[, <origin>]*
805
+ */
806
+ HttpResponseHeader["TIMING_ALLOW_ORIGIN"] = "Timing-Allow-Origin";
807
+ /**
808
+ * Provide the duration of the audio or video in seconds; only supported by Gecko browsers
809
+ *
810
+ * @example
811
+ * X-Content-Duration: 42.666
812
+ */
813
+ HttpResponseHeader["X_CONTENT_DURATION"] = "X-Content-Duration";
814
+ /**
815
+ * The only defined value, "nosniff", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type. This also applies to Google Chrome, when downloading extensions.
816
+ *
817
+ * @example
818
+ * X-Content-Type-Options: nosniff[62]
819
+ */
820
+ HttpResponseHeader["X_CONTENT_TYPE_OPTIONS"] = "X-Content-Type-Options";
821
+ /**
822
+ * Specifies the technology (e.g. ASP.NET, PHP, JBoss) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)
823
+ *
824
+ * @example
825
+ * X-Powered-By: PHP/5.4.0
826
+ */
827
+ HttpResponseHeader["X_POWERED_BY"] = "X-Powered-By";
828
+ /**
829
+ * Correlates HTTP requests between a client and server.
830
+ *
831
+ * @example
832
+ * X-Request-ID: f058ebd6-02f7-4d3f-942e-904344e8cde5
833
+ */
834
+ HttpResponseHeader["X_REQUEST_ID"] = "X-Request-ID";
835
+ /**
836
+ * Correlates HTTP requests between a client and server.
837
+ *
838
+ * @example
839
+ * X-Request-ID: f058ebd6-02f7-4d3f-942e-904344e8cde5
840
+ */
841
+ HttpResponseHeader["X_CORRELATION_ID"] = "X-Correlation-ID";
842
+ /**
843
+ * Recommends the preferred rendering engine (often a backward-compatibility mode) to use to display the content. Also used to activate Chrome Frame in Internet Explorer.
844
+ *
845
+ * @example
846
+ * X-UA-Compatible: IE=EmulateIE7
847
+ X-UA-Compatible: IE=edge
848
+ X-UA-Compatible: Chrome=1
849
+ */
850
+ HttpResponseHeader["X_UA_COMPATIBLE"] = "X-UA-Compatible";
851
+ /**
852
+ * Cross-site scripting (XSS) filter
853
+ *
854
+ * @example
855
+ * X-XSS-Protection: 1; mode=block
856
+ */
857
+ HttpResponseHeader["X_XSS_PROTECTION"] = "X-XSS-Protection";
858
+ return HttpResponseHeader;
859
+ }({});
860
+ export { HttpRequestHeader, HttpResponseHeader };