@d1g1tal/transportr 3.1.4 → 3.1.5

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.
@@ -1,4 +1,296 @@
1
- (() => {
2
- var T={OPTIONS:"OPTIONS",GET:"GET",HEAD:"HEAD",POST:"POST",PUT:"PUT",DELETE:"DELETE",TRACE:"TRACE",CONNECT:"CONNECT",PATCH:"PATCH"};
3
- globalThis.RequestMethod = T;
1
+ var __mod = (() => {
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/request-method.ts
21
+ var request_method_exports = {};
22
+ __export(request_method_exports, {
23
+ RequestMethod: () => RequestMethod
24
+ });
25
+ var RequestMethod = {
26
+ /**
27
+ * The OPTIONS method represents a request for information about the communication options available on the
28
+ * request/response chain identified by the Request-URI. This method allows the client to determine the options and/or
29
+ * requirements associated with a resource, or the capabilities of a server, without implying a resource action or
30
+ * initiating a resource retrieval.
31
+ *
32
+ * Responses to this method are not cacheable.
33
+ *
34
+ * If the OPTIONS request includes an entity-body (as indicated by the presence of Content-Length or
35
+ * Transfer-Encoding), then the media type MUST be indicated by a Content-Type field. Although this specification does
36
+ * not define any use for such a body, future extensions to HTTP might use the OPTIONS body to make more detailed
37
+ * queries on the server. A server that does not support such an extension MAY discard the request body.
38
+ *
39
+ * If the Request-URI is an asterisk ("*"), the OPTIONS request is intended to apply to the server in general rather
40
+ * than to a specific resource. Since a server's communication options typically depend on the resource, the "*"
41
+ * request is only useful as a "ping" or "no-op" type of method, it does nothing beyond allowing the client to test the
42
+ * capabilities of the server. For example, this can be used to test a proxy for HTTP/1.1 compliance (or lack thereof).
43
+ *
44
+ * If the Request-URI is not an asterisk, the OPTIONS request applies only to the options that are available when
45
+ * communicating with that resource.
46
+ *
47
+ * A 200 response SHOULD include any header fields that indicate optional features implemented by the server and
48
+ * applicable to that resource (e.g., Allow), possibly including extensions not defined by this specification. The
49
+ * response body, if any, SHOULD also include information about the communication options. The format for such a body
50
+ * is not defined by this specification, but might be defined by future extensions to HTTP. Content negotiation MAY be
51
+ * used to select the appropriate response format. If no response body is included, the response MUST include a
52
+ * Content-Length field with a field-value of "0".
53
+ *
54
+ * The Max-Forwards request-header field MAY be used to target a specific proxy in the request chain. When a proxy
55
+ * receives an OPTIONS request on an absoluteURI for which request forwarding is permitted, the proxy MUST check for a
56
+ * Max-Forwards field. If the Max-Forwards field-value is zero ("0"), the proxy MUST NOT forward the message, instead,
57
+ * the proxy SHOULD respond with its own communication options. If the Max-Forwards field-value is an integer greater
58
+ * than zero, the proxy MUST decrement the field-value when it forwards the request. If no Max-Forwards field is
59
+ * present in the request, then the forwarded request MUST NOT include a Max-Forwards field.
60
+ */
61
+ OPTIONS: "OPTIONS",
62
+ /**
63
+ * The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If
64
+ * the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in
65
+ * the response and not the source text of the process, unless that text happens to be the output of the process.
66
+ *
67
+ * The semantics of the GET method change to a "conditional GET" if the request message includes an If-Modified-Since;
68
+ * If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. A conditional GET method requests that the
69
+ * entity be transferred only under the circumstances described by the conditional header field(s). The conditional GET
70
+ * method is intended to reduce unnecessary network usage by allowing cached entities to be refreshed without requiring
71
+ * multiple requests or transferring data already held by the client.
72
+ *
73
+ * The semantics of the GET method change to a "partial GET" if the request message includes a Range header field. A
74
+ * partial GET requests that only part of the entity be transferred, as described in section 14.35. The partial GET
75
+ * method is intended to reduce unnecessary network usage by allowing partially-retrieved entities to be completed
76
+ * without transferring data already held by the client.
77
+ *
78
+ * The response to a GET request is cacheable if and only if it meets the requirements for HTTP caching described in
79
+ * section 13.
80
+ *
81
+ * See section 15.1.3 for security considerations when used for forms.
82
+ */
83
+ GET: "GET",
84
+ /**
85
+ * The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The
86
+ * meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information
87
+ * sent in response to a GET request. This method can be used for obtaining meta information about the entity implied by
88
+ * the request without transferring the entity-body itself. This method is often used for testing hypertext links for
89
+ * validity, accessibility, and recent modification.
90
+ *
91
+ * The response to a HEAD request MAY be cacheable in the sense that the information contained in the response MAY be
92
+ * used to update a previously cached entity from that resource. If the new field values indicate that the cached
93
+ * entity differs from the current entity (as would be indicated by a change in Content-Length, Content-MD5, ETag or
94
+ * Last-Modified), then the cache MUST treat the cache entry as stale.
95
+ */
96
+ HEAD: "HEAD",
97
+ /**
98
+ * The POST method is used to request that the origin server accept the entity enclosed in the request as a new
99
+ * subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform
100
+ * method to cover the following functions:
101
+ * <ul>
102
+ * <li>Annotation of existing resources,</li>
103
+ * <li>Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles,</li>
104
+ * <li>Providing a block of data, such as the result of submitting a form, to a data-handling process,</li>
105
+ * <li>Extending a database through an append operation.</li>
106
+ * </ul>
107
+ *
108
+ * The actual function performed by the POST method is determined by the server and is usually dependent on the
109
+ * Request-URI. The posted entity is subordinate to that URI in the same way that a file is subordinate to a directory
110
+ * containing it, a news article is subordinate to a newsgroup to which it is posted, or a record is subordinate to a
111
+ * database.
112
+ *
113
+ * The action performed by the POST method might not result in a resource that can be identified by a URI. In this
114
+ * case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on whether or not the
115
+ * response includes an entity that describes the result.
116
+ *
117
+ * If a resource has been created on the origin server, the response SHOULD be 201 (Created) and contain an entity
118
+ * which describes the status of the request and refers to the new resource, and a Location header (see section 14.30).
119
+ *
120
+ * Responses to this method are not cacheable, unless the response includes appropriate Cache-Control or Expires header
121
+ * fields. However, the 303 (See Other) response can be used to direct the user agent to retrieve a cacheable resource.
122
+ *
123
+ * POST requests MUST obey the message transmission requirements set out in section 8.2.
124
+ *
125
+ * See section 15.1.3 for security considerations.
126
+ */
127
+ POST: "POST",
128
+ /**
129
+ * The PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers
130
+ * to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing
131
+ * on the origin server. If the Request-URI does not point to an existing resource, and that URI is capable of being
132
+ * defined as a new resource by the requesting user agent, the origin server can create the resource with that URI. If
133
+ * a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. If an
134
+ * existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to indicate
135
+ * successful completion of the request. If the resource could not be created or modified with the Request-URI, an
136
+ * appropriate error response SHOULD be given that reflects the nature of the problem. The recipient of the entity MUST
137
+ * \NOT ignore any Content-* (e.g. Content-Range) headers that it does not understand or implement and MUST return a
138
+ * 501 (Not Implemented) response in such cases.
139
+ *
140
+ * If the request passes through a cache and the Request-URI identifies one or more currently cached entities, those
141
+ * entries SHOULD be treated as stale. Responses to this method are not cacheable.
142
+ *
143
+ * The fundamental difference between the POST and PUT requests is reflected in the different meaning of the
144
+ * Request-URI. The URI in a POST request identifies the resource that will handle the enclosed entity. That resource
145
+ * might be a data-accepting process, a gateway to some other protocol, or a separate entity that accepts annotations.
146
+ * In contrast, the URI in a PUT request identifies the entity enclosed with the request -- the user agent knows what
147
+ * URI is intended and the server MUST NOT attempt to apply the request to some other resource. If the server desires
148
+ * that the request be applied to a different URI, it MUST send a 301 (Moved Permanently) response, the user agent MAY
149
+ * then make its own decision regarding whether or not to redirect the request.
150
+ *
151
+ * A single resource MAY be identified by many different URIs. For example, an article might have a URI for identifying
152
+ * "the current version" which is separate from the URI identifying each particular version. In this case, a PUT
153
+ * request on a general URI might result in several other URIs being defined by the origin server.
154
+ *
155
+ * HTTP/1.1 does not define how a PUT method affects the state of an origin server.
156
+ *
157
+ * PUT requests MUST obey the message transmission requirements set out in section 8.2.
158
+ *
159
+ * Unless otherwise specified for a particular entity-header, the entity-headers in the PUT request SHOULD be applied
160
+ * to the resource created or modified by the PUT.
161
+ */
162
+ PUT: "PUT",
163
+ /**
164
+ * The DELETE method requests that the origin server delete the resource identified by the Request-URI. This method MAY
165
+ * be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the
166
+ * operation has been carried out, even if the status code returned from the origin server indicates that the action
167
+ * has been completed successfully. However, the server SHOULD NOT indicate success unless, at the time the response
168
+ * is given, it intends to delete the resource or move it to an inaccessible location.
169
+ *
170
+ * A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, 202 (Accepted) if
171
+ * the action has not yet been enacted, or 204 (No Content) if the action has been enacted but the response does not
172
+ * include an entity.
173
+ *
174
+ * If the request passes through a cache and the Request-URI identifies one or more currently cached entities, those
175
+ * entries SHOULD be treated as stale. Responses to this method are not cacheable.
176
+ */
177
+ DELETE: "DELETE",
178
+ /**
179
+ * The TRACE method is used to invoke a remote, application-layer loop- back of the request message. The final
180
+ * recipient of the request SHOULD reflect the message received back to the client as the entity-body of a 200 (OK)
181
+ * response. The final recipient is either the origin server or the first proxy or gateway to receive a Max-Forwards
182
+ * value of zero (0) in the request (see section 14.31). A TRACE request MUST NOT include an entity.
183
+ *
184
+ * TRACE allows the client to see what is being received at the other end of the request chain and use that data for
185
+ * testing or diagnostic information. The value of the Via header field (section 14.45) is of particular interest,
186
+ * since it acts as a trace of the request chain. Use of the Max-Forwards header field allows the client to limit the
187
+ * length of the request chain, which is useful for testing a chain of proxies forwarding messages in an infinite loop.
188
+ *
189
+ * If the request is valid, the response SHOULD contain the entire request message in the entity-body, with a
190
+ * Content-Type of "message/http". Responses to this method MUST NOT be cached.
191
+ */
192
+ TRACE: "TRACE",
193
+ /**
194
+ * This specification reserves the method name CONNECT for use with a proxy that can dynamically switch to being a
195
+ * tunnel (e.g. SSL tunneling [44]).
196
+ */
197
+ CONNECT: "CONNECT",
198
+ /**
199
+ * The PATCH method requests that a set of changes described in the
200
+ * request entity be applied to the resource identified by the Request-
201
+ * URI. The set of changes is represented in a format called a "patch
202
+ * document" identified by a media type. If the Request-URI does not
203
+ * point to an existing resource, the server MAY create a new resource,
204
+ * depending on the patch document type (whether it can logically modify
205
+ * a null resource) and permissions, etc.
206
+ *
207
+ * The difference between the PUT and PATCH requests is reflected in the
208
+ * way the server processes the enclosed entity to modify the resource
209
+ * identified by the Request-URI. In a PUT request, the enclosed entity
210
+ * is considered to be a modified version of the resource stored on the
211
+ * origin server, and the client is requesting that the stored version
212
+ * be replaced. With PATCH, however, the enclosed entity contains a set
213
+ * of instructions describing how a resource currently residing on the
214
+ * origin server should be modified to produce a new version. The PATCH
215
+ * method affects the resource identified by the Request-URI, and it
216
+ * also MAY have side effects on other resources; i.e., new resources
217
+ * may be created, or existing ones modified, by the application of a
218
+ * PATCH.
219
+ *
220
+ * PATCH is neither safe nor idempotent as defined by [RFC2616], Section
221
+ * 9.1.
222
+ *
223
+ * A PATCH request can be issued in such a way as to be idempotent,
224
+ * which also helps prevent bad outcomes from collisions between two
225
+ * PATCH requests on the same resource in a similar time frame.
226
+ * Collisions from multiple PATCH requests may be more dangerous than
227
+ * PUT collisions because some patch formats need to operate from a
228
+ * known base-point or else they will corrupt the resource. Clients
229
+ * using this kind of patch application SHOULD use a conditional request
230
+ * such that the request will fail if the resource has been updated
231
+ * since the client last accessed the resource. For example, the client
232
+ * can use a strong ETag [RFC2616] in an If-Match header on the PATCH
233
+ * request.
234
+ *
235
+ * There are also cases where patch formats do not need to operate from
236
+ * a known base-point (e.g., appending text lines to log files, or non-
237
+ * colliding rows to database tables), in which case the same care in
238
+ * client requests is not needed.
239
+ *
240
+ * The server MUST apply the entire set of changes atomically and never
241
+ * provide (e.g., in response to a GET during this operation) a
242
+ * partially modified representation. If the entire patch document
243
+ * cannot be successfully applied, then the server MUST NOT apply any of
244
+ * the changes. The determination of what constitutes a successful
245
+ * PATCH can vary depending on the patch document and the type of
246
+ * resource(s) being modified. For example, the common 'diff' utility
247
+ * can generate a patch document that applies to multiple files in a
248
+ * directory hierarchy. The atomicity requirement holds for all
249
+ * directly affected files. See "Error Handling", Section 2.2, for
250
+ * details on status codes and possible error conditions.
251
+ *
252
+ * If the request passes through a cache and the Request-URI identifies
253
+ * one or more currently cached entities, those entries SHOULD be
254
+ * treated as stale. A response to this method is only cacheable if it
255
+ * contains explicit freshness information (such as an Expires header or
256
+ * "Cache-Control: max-age" directive) as well as the Content-Location
257
+ * header matching the Request-URI, indicating that the PATCH response
258
+ * body is a resource representation. A cached PATCH response can only
259
+ * be used to respond to subsequent GET and HEAD requests; it MUST NOT
260
+ * be used to respond to other methods (in particular, PATCH).
261
+ *
262
+ * Note that entity-headers contained in the request apply only to the
263
+ * contained patch document and MUST NOT be applied to the resource
264
+ * being modified. Thus, a Content-Language header could be present on
265
+ * the request, but it would only mean (for whatever that's worth) that
266
+ * the patch document had a language. Servers SHOULD NOT store such
267
+ * headers except as trace information, and SHOULD NOT use such header
268
+ * values the same way they might be used on PUT requests. Therefore,
269
+ * this document does not specify a way to modify a document's Content-
270
+ * Type or Content-Language value through headers, though a mechanism
271
+ * could well be designed to achieve this goal through a patch document.
272
+ *
273
+ * There is no guarantee that a resource can be modified with PATCH.
274
+ * Further, it is expected that different patch document formats will be
275
+ * appropriate for different types of resources and that no single
276
+ * format will be appropriate for all types of resources. Therefore,
277
+ * there is no single default patch document format that implementations
278
+ * are required to support. Servers MUST ensure that a received patch
279
+ * document is appropriate for the type of resource identified by the
280
+ * Request-URI.
281
+ *
282
+ * Clients need to choose when to use PATCH rather than PUT. For
283
+ * example, if the patch document size is larger than the size of the
284
+ * new resource data that would be used in a PUT, then it might make
285
+ * sense to use PUT instead of PATCH. A comparison to POST is even more
286
+ * difficult, because POST is used in widely varying ways and can
287
+ * encompass PUT and PATCH-like operations if the server chooses. If
288
+ * the operation does not modify the resource identified by the Request-
289
+ * URI in a predictable way, POST should be considered instead of PATCH
290
+ * or PUT.
291
+ */
292
+ PATCH: "PATCH"
293
+ };
294
+ return __toCommonJS(request_method_exports);
4
295
  })();
296
+ globalThis.RequestMethod = __mod.RequestMethod;
@@ -1,4 +1,369 @@
1
- (() => {
2
- var t={PROXY_CONNECTION:"proxy-connection",X_UIDH:"x-uidh",X_CSRF_TOKEN:"x-csrf-token",ACCESS_CONTROL_ALLOW_ORIGIN:"access-control-allow-origin",ACCEPT_PATCH:"accept-patch",ACCEPT_RANGES:"accept-ranges",AGE:"age",ALLOW:"allow",CACHE_CONTROL:"cache-control",CONNECTION:"connection",CONTENT_DISPOSITION:"content-disposition",CONTENT_ENCODING:"content-encoding",CONTENT_LANGUAGE:"content-language",CONTENT_LENGTH:"content-length",CONTENT_LOCATION:"content-location",CONTENT_RANGE:"content-range",CONTENT_TYPE:"content-type",DATE:"date",ETAG:"etag",EXPIRES:"expires",LAST_MODIFIED:"last-modified",LINK:"link",LOCATION:"location",P3P:"p3p",PRAGMA:"pragma",PROXY_AUTHENTICATION:"proxy-authenticate",PUBLIC_KEY_PINS:"public-key-pins",RETRY_AFTER:"retry-after",SERVER:"server",SET_COOKIE:"set-cookie",STATUS:"status",STRICT_TRANSPORT_SECURITY:"strict-transport-security",TRAILER:"trailer",TRANSFER_ENCODING:"transfer-encoding",UPGRADE:"upgrade",VARY:"vary",VIA:"via",WARNING:"warning",WWW_AUTHENTICATE:"www-authenticate",X_XSS_PROTECTION:"x-xss-protection",CONTENT_SECURITY_POLICY:"content-security-policy",X_CONTENT_TYPE_OPTIONS:"x-content-type-options",X_POWERED_BY:"x-powered-by"};
3
- globalThis.ResponseHeader = t;
1
+ var __mod = (() => {
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/response-header.ts
21
+ var response_header_exports = {};
22
+ __export(response_header_exports, {
23
+ ResponseHeader: () => ResponseHeader
24
+ });
25
+ var ResponseHeader = {
26
+ /**
27
+ * 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.
28
+ *
29
+ * @example
30
+ * proxy-connection: keep-alive
31
+ */
32
+ PROXY_CONNECTION: "proxy-connection",
33
+ /**
34
+ * Server-side deep packet insertion of a unique ID identifying customers of Verizon Wireless, also known as "perma-cookie" or "supercookie"
35
+ *
36
+ * @example
37
+ * x-uidh: ...
38
+ */
39
+ X_UIDH: "x-uidh",
40
+ /**
41
+ * Used to prevent cross-site request forgery. Alternative header names are: X-CSRFToken and X-XSRF-TOKEN
42
+ *
43
+ * @example
44
+ * x-csrf-token: i8XNjC4b8KVok4uw5RftR38Wgp2BFwql
45
+ */
46
+ X_CSRF_TOKEN: "x-csrf-token",
47
+ /**
48
+ * Specifying which web sites can participate in cross-origin resource sharing
49
+ *
50
+ * @example
51
+ * access-control-allow-origin: *
52
+ * Provisional
53
+ */
54
+ ACCESS_CONTROL_ALLOW_ORIGIN: "access-control-allow-origin",
55
+ /**
56
+ * Specifies which patch document formats this server supports
57
+ *
58
+ * @example
59
+ * accept-patch: text/example,charset=utf-8
60
+ * Permanent
61
+ */
62
+ ACCEPT_PATCH: "accept-patch",
63
+ /**
64
+ * What partial content range types this server supports via byte serving
65
+ *
66
+ * @example
67
+ * accept-ranges: bytes
68
+ * Permanent
69
+ */
70
+ ACCEPT_RANGES: "accept-ranges",
71
+ /**
72
+ * The age the object has been in a proxy cache in seconds
73
+ *
74
+ * @example
75
+ * age: 12
76
+ * Permanent
77
+ */
78
+ AGE: "age",
79
+ /**
80
+ * Valid actions for a specified resource. To be used for a 405 Method not allowed
81
+ *
82
+ * @example
83
+ * allow: GET, HEAD
84
+ * Permanent
85
+ */
86
+ ALLOW: "allow",
87
+ /**
88
+ * Tells all caching mechanisms from server to client whether they may cache this object. It is measured in seconds
89
+ *
90
+ * @example
91
+ * cache-control: max-age=3600
92
+ * Permanent
93
+ */
94
+ CACHE_CONTROL: "cache-control",
95
+ /**
96
+ * Control options for the current connection and list of hop-by-hop response fields
97
+ *
98
+ * @example
99
+ * connection: close
100
+ * Permanent
101
+ */
102
+ CONNECTION: "connection",
103
+ /**
104
+ * 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.
105
+ *
106
+ * @example
107
+ * content-disposition: attachment, filename="fname.ext"
108
+ * Permanent
109
+ */
110
+ CONTENT_DISPOSITION: "content-disposition",
111
+ /**
112
+ * The type of encoding used on the data. See HTTP compression.
113
+ *
114
+ * @example
115
+ * content-encoding: gzip
116
+ * Permanent
117
+ */
118
+ CONTENT_ENCODING: "content-encoding",
119
+ /**
120
+ * The natural language or languages of the intended audience for the enclosed content
121
+ *
122
+ * @example
123
+ * content-language: da
124
+ * Permanent
125
+ */
126
+ CONTENT_LANGUAGE: "content-language",
127
+ /**
128
+ * The length of the response body in octets (8-bit bytes)
129
+ *
130
+ * @example
131
+ * content-length: 348
132
+ * Permanent
133
+ */
134
+ CONTENT_LENGTH: "content-length",
135
+ /**
136
+ * An alternate location for the returned data
137
+ *
138
+ * @example
139
+ * content-location: /index.htm
140
+ * Permanent
141
+ */
142
+ CONTENT_LOCATION: "content-location",
143
+ /**
144
+ * Where in a full body message this partial message belongs
145
+ *
146
+ * @example
147
+ * content-range: bytes 21010-47021/47022
148
+ * Permanent
149
+ */
150
+ CONTENT_RANGE: "content-range",
151
+ /**
152
+ * The MIME type of this content
153
+ *
154
+ * @example
155
+ * content-type: text/html, charset=utf-8
156
+ * Permanent
157
+ */
158
+ CONTENT_TYPE: "content-type",
159
+ /**
160
+ * The date and time that the message was sent (in "HTTP-date" format as defined by RFC 7231)
161
+ *
162
+ * @example
163
+ * date: Tue, 15 Nov 1994 08:12:31 GMT
164
+ * Permanent
165
+ */
166
+ DATE: "date",
167
+ /**
168
+ * An identifier for a specific version of a resource, often a message digest
169
+ *
170
+ * @example
171
+ * etag: "737060cd8c284d8af7ad3082f209582d"
172
+ * Permanent
173
+ */
174
+ ETAG: "etag",
175
+ /**
176
+ * Gives the date/time after which the response is considered stale (in "HTTP-date" format as defined by RFC 7231)
177
+ *
178
+ * @example
179
+ * expires: Thu, 01 Dec 1994 16:00:00 GMT
180
+ * Permanent
181
+ */
182
+ EXPIRES: "expires",
183
+ /**
184
+ * The last modified date for the requested object (in "HTTP-date" format as defined by RFC 7231)
185
+ *
186
+ * @example
187
+ * last-modified: Tue, 15 Nov 1994 12:45:26 GMT
188
+ * Permanent
189
+ */
190
+ LAST_MODIFIED: "last-modified",
191
+ /**
192
+ * Used to express a typed relationship with another resource, where the relation type is defined by RFC 5988
193
+ *
194
+ * @example
195
+ * link: </feed>, rel="alternate"
196
+ * Permanent
197
+ */
198
+ LINK: "link",
199
+ /**
200
+ * Used in redirection, or when a new resource has been created.
201
+ *
202
+ * @example
203
+ * location: http://www.w3.org/pub/WWW/People.html
204
+ * Permanent
205
+ */
206
+ LOCATION: "location",
207
+ /**
208
+ * 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
209
+ * 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.
210
+ *
211
+ * @example
212
+ * p3p: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
213
+ * Permanent
214
+ */
215
+ P3P: "p3p",
216
+ /**
217
+ * Implementation-specific fields that may have various effects anywhere along the request-response chain.
218
+ *
219
+ * @example
220
+ * pragma: no-cache
221
+ * Permanent
222
+ */
223
+ PRAGMA: "pragma",
224
+ /**
225
+ * Request authentication to access the proxy.
226
+ *
227
+ * @example
228
+ * proxy-authenticate: Basic
229
+ * Permanent
230
+ */
231
+ PROXY_AUTHENTICATION: "proxy-authenticate",
232
+ /**
233
+ * HTTP Public Key Pinning, announces hash of website's authentic TLS certificate
234
+ *
235
+ * @example
236
+ * public-key-pins: max-age=2592000, pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=",
237
+ * Permanent
238
+ */
239
+ PUBLIC_KEY_PINS: "public-key-pins",
240
+ /**
241
+ * 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.
242
+ *
243
+ * @example
244
+ * retry-after: 120
245
+ * retry-after: Fri, 07 Nov 2014 23:59:59 GMT
246
+ * Permanent
247
+ */
248
+ RETRY_AFTER: "retry-after",
249
+ /**
250
+ * A name for the server
251
+ *
252
+ * @example
253
+ * server: Apache/2.4.1 (Unix)
254
+ * Permanent
255
+ */
256
+ SERVER: "server",
257
+ /**
258
+ * An HTTP cookie
259
+ *
260
+ * @example
261
+ * set-cookie: UserID=JohnDoe, Max-Age=3600, Version=1
262
+ * Permanent
263
+ */
264
+ SET_COOKIE: "set-cookie",
265
+ /**
266
+ * CGI header field specifying the status of the HTTP response. Normal HTTP responses use a separate "Status-Line" instead, defined by RFC 7230.
267
+ *
268
+ * @example
269
+ * status: 200 OK
270
+ */
271
+ STATUS: "status",
272
+ /**
273
+ * A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains.
274
+ *
275
+ * @example
276
+ * strict-transport-security: max-age=16070400, includeSubDomains
277
+ * Permanent
278
+ */
279
+ STRICT_TRANSPORT_SECURITY: "strict-transport-security",
280
+ /**
281
+ * 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.
282
+ *
283
+ * @example
284
+ * trailer: Max-Forwards
285
+ * Permanent
286
+ */
287
+ TRAILER: "trailer",
288
+ /**
289
+ * The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
290
+ *
291
+ * @example
292
+ * transfer-encoding: chunked
293
+ * Permanent
294
+ */
295
+ TRANSFER_ENCODING: "transfer-encoding",
296
+ /**
297
+ * Ask the client to upgrade to another protocol.
298
+ *
299
+ * @example
300
+ * upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
301
+ * Permanent
302
+ */
303
+ UPGRADE: "upgrade",
304
+ /**
305
+ * 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.
306
+ *
307
+ * @example
308
+ * vary: *
309
+ * Permanent
310
+ */
311
+ VARY: "vary",
312
+ /**
313
+ * Informs the client of proxies through which the response was sent.
314
+ *
315
+ * @example
316
+ * via: 1.0 fred, 1.1 example.com (Apache/1.1)
317
+ * Permanent
318
+ */
319
+ VIA: "via",
320
+ /**
321
+ * A general warning about possible problems with the entity body.
322
+ *
323
+ * @example
324
+ * warning: 199 Miscellaneous warning
325
+ * Permanent
326
+ */
327
+ WARNING: "warning",
328
+ /**
329
+ * Indicates the authentication scheme that should be used to access the requested entity.
330
+ *
331
+ * @example
332
+ * www-authenticate: Basic
333
+ * Permanent
334
+ */
335
+ WWW_AUTHENTICATE: "www-authenticate",
336
+ /**
337
+ * Cross-site scripting (XSS) filter
338
+ *
339
+ * @example
340
+ * x-xss-protection: 1, mode=block
341
+ */
342
+ X_XSS_PROTECTION: "x-xss-protection",
343
+ /**
344
+ * The HTTP Content-Security-Policy response header allows web site administrators to control resources the user agent is allowed
345
+ * to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints.
346
+ * This helps guard against cross-site scripting attacks (Cross-site_scripting).
347
+ *
348
+ * @example
349
+ * content-security-policy: default-src
350
+ */
351
+ CONTENT_SECURITY_POLICY: "content-security-policy",
352
+ /**
353
+ * 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.
354
+ *
355
+ * @example
356
+ * x-content-type-options: nosniff
357
+ */
358
+ X_CONTENT_TYPE_OPTIONS: "x-content-type-options",
359
+ /**
360
+ * 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)
361
+ *
362
+ * @example
363
+ * x-powered-by: PHP/5.4.0
364
+ */
365
+ X_POWERED_BY: "x-powered-by"
366
+ };
367
+ return __toCommonJS(response_header_exports);
4
368
  })();
369
+ globalThis.ResponseHeader = __mod.ResponseHeader;